compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    interface {
      name {
        name: "IntLike"
      }
      members {
        function {
          name {
            name: "Convert"
          }
          self_pattern {
            binding_pattern {
              name: "self"
              type {
                expression_pattern {
                  expression {
                    identifier {
                      name: "Self"
                    }
                  }
                }
              }
            }
          }
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
        }
      }
    }
  }
  declarations {
    impl {
      kind: InternalImpl
      impl_type {
        int_type_literal {
        }
      }
      interface {
        identifier {
          name: "IntLike"
        }
      }
      members {
        function {
          name {
            name: "Convert"
          }
          self_pattern {
            binding_pattern {
              name: "self"
              type {
                expression_pattern {
                  expression {
                    int_type_literal {
                    }
                  }
                }
              }
            }
          }
          param_pattern {
          }
          return_term {
            kind: Expression
            type {
              int_type_literal {
              }
            }
          }
          body {
            statements {
              return_expression_statement {
                expression {
                  identifier {
                    name: "self"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "add"
      }
      deduced_parameters {
        name: "T"
        type {
          identifier {
            name: "IntLike"
          }
        }
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  struct_type_literal {
                    fields {
                      name: "a"
                      expression {
                        identifier {
                          name: "T"
                        }
                      }
                    }
                    fields {
                      name: "b"
                      expression {
                        tuple_literal {
                          fields {
                            struct_type_literal {
                              fields {
                                name: "m"
                                expression {
                                  int_type_literal {
                                  }
                                }
                              }
                              fields {
                                name: "n"
                                expression {
                                  identifier {
                                    name: "T"
                                  }
                                }
                              }
                            }
                          }
                          fields {
                            int_type_literal {
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              operator {
                op: Add
                arguments {
                  operator {
                    op: Add
                    arguments {
                      operator {
                        op: Add
                        arguments {
                          operator {
                            op: Mul
                            arguments {
                              int_literal {
                                value: 1000
                              }
                            }
                            arguments {
                              call {
                                function {
                                  simple_member_access {
                                    field: "Convert"
                                    object {
                                      simple_member_access {
                                        field: "a"
                                        object {
                                          identifier {
                                            name: "x"
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                                argument {
                                  tuple_literal {
                                  }
                                }
                              }
                            }
                          }
                        }
                        arguments {
                          operator {
                            op: Mul
                            arguments {
                              int_literal {
                                value: 100
                              }
                            }
                            arguments {
                              simple_member_access {
                                field: "m"
                                object {
                                  index {
                                    object {
                                      simple_member_access {
                                        field: "b"
                                        object {
                                          identifier {
                                            name: "x"
                                          }
                                        }
                                      }
                                    }
                                    offset {
                                      int_literal {
                                        value: 0
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                    arguments {
                      operator {
                        op: Mul
                        arguments {
                          int_literal {
                            value: 10
                          }
                        }
                        arguments {
                          call {
                            function {
                              simple_member_access {
                                field: "Convert"
                                object {
                                  simple_member_access {
                                    field: "n"
                                    object {
                                      index {
                                        object {
                                          simple_member_access {
                                            field: "b"
                                            object {
                                              identifier {
                                                name: "x"
                                              }
                                            }
                                          }
                                        }
                                        offset {
                                          int_literal {
                                            value: 0
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                            argument {
                              tuple_literal {
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
                arguments {
                  index {
                    object {
                      simple_member_access {
                        field: "b"
                        object {
                          identifier {
                            name: "x"
                          }
                        }
                      }
                    }
                    offset {
                      int_literal {
                        value: 1
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  declarations {
    function {
      name {
        name: "Main"
      }
      param_pattern {
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          return_expression_statement {
            expression {
              call {
                function {
                  identifier {
                    name: "add"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      struct_literal {
                        fields {
                          name: "b"
                          expression {
                            tuple_literal {
                              fields {
                                struct_literal {
                                  fields {
                                    name: "n"
                                    expression {
                                      int_literal {
                                        value: 1
                                      }
                                    }
                                  }
                                  fields {
                                    name: "m"
                                    expression {
                                      int_literal {
                                        value: 2
                                      }
                                    }
                                  }
                                }
                              }
                              fields {
                                int_literal {
                                  value: 3
                                }
                              }
                            }
                          }
                        }
                        fields {
                          name: "a"
                          expression {
                            int_literal {
                              value: 4
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
