compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    impl {
      kind: ExternalImpl
      impl_type {
        struct_type_literal {
          fields {
            name: "x"
            expression {
              int_type_literal {
              }
            }
          }
          fields {
            name: "y"
            expression {
              int_type_literal {
              }
            }
          }
        }
      }
      interface {
        call {
          function {
            identifier {
              name: "EqWith"
            }
          }
          argument {
            tuple_literal {
              fields {
                identifier {
                  name: "Self"
                }
              }
            }
          }
        }
      }
      members {
        function {
          name {
            name: "Equal"
          }
          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 {
              bool_type_literal {
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  operator {
                    op: And
                    arguments {
                      operator {
                        op: Eq
                        arguments {
                          simple_member_access {
                            field: "x"
                            object {
                              identifier {
                                name: "self"
                              }
                            }
                          }
                        }
                        arguments {
                          simple_member_access {
                            field: "x"
                            object {
                              identifier {
                                name: "other"
                              }
                            }
                          }
                        }
                      }
                    }
                    arguments {
                      operator {
                        op: Eq
                        arguments {
                          simple_member_access {
                            field: "y"
                            object {
                              identifier {
                                name: "self"
                              }
                            }
                          }
                        }
                        arguments {
                          simple_member_access {
                            field: "y"
                            object {
                              identifier {
                                name: "other"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      members {
        function {
          name {
            name: "NotEqual"
          }
          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 {
              bool_type_literal {
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  operator {
                    op: Or
                    arguments {
                      operator {
                        op: NotEq
                        arguments {
                          simple_member_access {
                            field: "x"
                            object {
                              identifier {
                                name: "self"
                              }
                            }
                          }
                        }
                        arguments {
                          simple_member_access {
                            field: "x"
                            object {
                              identifier {
                                name: "other"
                              }
                            }
                          }
                        }
                      }
                    }
                    arguments {
                      operator {
                        op: NotEq
                        arguments {
                          simple_member_access {
                            field: "y"
                            object {
                              identifier {
                                name: "self"
                              }
                            }
                          }
                        }
                        arguments {
                          simple_member_access {
                            field: "y"
                            object {
                              identifier {
                                name: "other"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "Main"
      }
      param_pattern {
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "t1"
                type {
                  expression_pattern {
                    expression {
                      struct_type_literal {
                        fields {
                          name: "x"
                          expression {
                            int_type_literal {
                            }
                          }
                        }
                        fields {
                          name: "y"
                          expression {
                            int_type_literal {
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "x"
                  expression {
                    int_literal {
                      value: 5
                    }
                  }
                }
                fields {
                  name: "y"
                  expression {
                    int_literal {
                      value: 2
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          variable_definition {
            pattern {
              binding_pattern {
                name: "t2"
                type {
                  expression_pattern {
                    expression {
                      struct_type_literal {
                        fields {
                          name: "x"
                          expression {
                            int_type_literal {
                            }
                          }
                        }
                        fields {
                          name: "y"
                          expression {
                            int_type_literal {
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            init {
              struct_literal {
                fields {
                  name: "x"
                  expression {
                    int_literal {
                      value: 5
                    }
                  }
                }
                fields {
                  name: "y"
                  expression {
                    int_literal {
                      value: 2
                    }
                  }
                }
              }
            }
            is_returned: false
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "t1 == t2: {0}"
                      }
                    }
                    fields {
                      if_expression {
                        condition {
                          operator {
                            op: Eq
                            arguments {
                              identifier {
                                name: "t1"
                              }
                            }
                            arguments {
                              identifier {
                                name: "t2"
                              }
                            }
                          }
                        }
                        then_expression {
                          int_literal {
                            value: 1
                          }
                        }
                        else_expression {
                          int_literal {
                            value: 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "Print"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      string_literal {
                        value: "t1 != t2: {0}"
                      }
                    }
                    fields {
                      if_expression {
                        condition {
                          operator {
                            op: NotEq
                            arguments {
                              identifier {
                                name: "t1"
                              }
                            }
                            arguments {
                              identifier {
                                name: "t2"
                              }
                            }
                          }
                        }
                        then_expression {
                          int_literal {
                            value: 1
                          }
                        }
                        else_expression {
                          int_literal {
                            value: 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        statements {
          return_expression_statement {
            expression {
              int_literal {
                value: 0
              }
            }
          }
        }
      }
    }
  }
}
