compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    mixin {
      name {
        name: "Operations"
      }
      members {
        function {
          name {
            name: "Square"
          }
          self_pattern {
            binding_pattern {
              name: "self"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
            fields {
              binding_pattern {
                name: "x"
                type {
                  expression_pattern {
                    expression {
                      int_type_literal {
                      }
                    }
                  }
                }
              }
            }
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  operator {
                    op: Mul
                    arguments {
                      identifier {
                        name: "x"
                      }
                    }
                    arguments {
                      identifier {
                        name: "x"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      self {
        name: "Self"
        type {
          type_type_literal {
          }
        }
      }
    }
  }
  declarations {
    class_declaration {
      name {
        name: "Point"
      }
      members {
        variable {
          binding {
            name: "x"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
      members {
        variable {
          binding {
            name: "y"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
      members {
        function {
          name {
            name: "DistanceSquare"
          }
          self_pattern {
            binding_pattern {
              name: "self"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
            fields {
              binding_pattern {
                name: "other"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "Self"
                      }
                    }
                  }
                }
              }
            }
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  operator {
                    op: Add
                    arguments {
                      call {
                        function {
                          simple_member_access {
                            field: "Square"
                            object {
                              identifier {
                                name: "self"
                              }
                            }
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              operator {
                                op: Sub
                                arguments {
                                  simple_member_access {
                                    field: "x"
                                    object {
                                      identifier {
                                        name: "self"
                                      }
                                    }
                                  }
                                }
                                arguments {
                                  simple_member_access {
                                    field: "x"
                                    object {
                                      identifier {
                                        name: "other"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                    arguments {
                      call {
                        function {
                          simple_member_access {
                            field: "Square"
                            object {
                              identifier {
                                name: "self"
                              }
                            }
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              operator {
                                op: Sub
                                arguments {
                                  simple_member_access {
                                    field: "y"
                                    object {
                                      identifier {
                                        name: "self"
                                      }
                                    }
                                  }
                                }
                                arguments {
                                  simple_member_access {
                                    field: "y"
                                    object {
                                      identifier {
                                        name: "other"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      members {
        mix {
          mixin {
            identifier {
              name: "Operations"
            }
          }
        }
      }
    }
  }
  declarations {
    class_declaration {
      name {
        name: "Complex"
      }
      members {
        variable {
          binding {
            name: "r"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
      members {
        variable {
          binding {
            name: "i"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
      members {
        mix {
          mixin {
            identifier {
              name: "Operations"
            }
          }
        }
      }
      members {
        function {
          name {
            name: "AbsSquare"
          }
          self_pattern {
            binding_pattern {
              name: "self"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  operator {
                    op: Add
                    arguments {
                      call {
                        function {
                          simple_member_access {
                            field: "Square"
                            object {
                              identifier {
                                name: "self"
                              }
                            }
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              simple_member_access {
                                field: "r"
                                object {
                                  identifier {
                                    name: "self"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                    arguments {
                      call {
                        function {
                          simple_member_access {
                            field: "Square"
                            object {
                              identifier {
                                name: "self"
                              }
                            }
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              simple_member_access {
                                field: "i"
                                object {
                                  identifier {
                                    name: "self"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "Main"
      }
      param_pattern {
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "p1"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "Point"
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "x"
                  expression {
                    int_literal {
                      value: 1
                    }
                  }
                }
                fields {
                  name: "y"
                  expression {
                    int_literal {
                      value: 2
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "p2"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "Point"
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "x"
                  expression {
                    int_literal {
                      value: 4
                    }
                  }
                }
                fields {
                  name: "y"
                  expression {
                    int_literal {
                      value: 3
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "c"
                type {
                  expression_pattern {
                    expression {
                      identifier {
                        name: "Complex"
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "r"
                  expression {
                    int_literal {
                      value: 5
                    }
                  }
                }
                fields {
                  name: "i"
                  expression {
                    int_literal {
                      value: 6
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          return_expression_statement {
            expression {
              operator {
                op: Sub
                arguments {
                  operator {
                    op: Sub
                    arguments {
                      call {
                        function {
                          simple_member_access {
                            field: "AbsSquare"
                            object {
                              identifier {
                                name: "c"
                              }
                            }
                          }
                        }
                        argument {
                          tuple_literal {
                          }
                        }
                      }
                    }
                    arguments {
                      call {
                        function {
                          simple_member_access {
                            field: "DistanceSquare"
                            object {
                              identifier {
                                name: "p1"
                              }
                            }
                          }
                        }
                        argument {
                          tuple_literal {
                            fields {
                              identifier {
                                name: "p2"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
                arguments {
                  int_literal {
                    value: 51
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
