compilation_unit {
  package_statement {
    package_name: "ExplorerTest"
  }
  is_api: true
  declarations {
    function {
      name {
        name: "f"
      }
      param_pattern {
        fields {
          binding_pattern {
            name: "x"
            type {
              expression_pattern {
                expression {
                  int_type_literal {
                  }
                }
              }
            }
          }
        }
      }
      return_term {
        kind: Expression
        type {
          int_type_literal {
          }
        }
      }
      body {
        statements {
          if_statement {
            condition {
              operator {
                op: Eq
                arguments {
                  identifier {
                    name: "x"
                  }
                }
                arguments {
                  int_literal {
                    value: 0
                  }
                }
              }
            }
            then_block {
              statements {
                return_expression_statement {
                  expression {
                    identifier {
                      name: "x"
                    }
                  }
                }
              }
            }
            else_block {
              statements {
                return_expression_statement {
                  expression {
                    call {
                      function {
                        identifier {
                          name: "f"
                        }
                      }
                      argument {
                        tuple_literal {
                          fields {
                            operator {
                              op: Sub
                              arguments {
                                identifier {
                                  name: "x"
                                }
                              }
                              arguments {
                                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: "f"
                  }
                }
                argument {
                  tuple_literal {
                    fields {
                      int_literal {
                        value: 2
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
