(* Generated by coq-of-rust *)
Require Import CoqOfRust.CoqOfRust.

Module bytecode.
  Module eof.
    Module header.
      (* StructRecord
        {
          name := "EofHeader";
          const_params := [];
          ty_params := [];
          fields :=
            [
              ("types_size", Ty.path "u16");
              ("code_sizes",
                Ty.apply
                  (Ty.path "alloc::vec::Vec")
                  []
                  [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ]);
              ("container_sizes",
                Ty.apply
                  (Ty.path "alloc::vec::Vec")
                  []
                  [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ]);
              ("data_size", Ty.path "u16");
              ("sum_code_sizes", Ty.path "usize");
              ("sum_container_sizes", Ty.path "usize")
            ];
        } *)
      
      Module Impl_core_clone_Clone_for_revm_primitives_bytecode_eof_header_EofHeader.
        Definition Self : Ty.t := Ty.path "revm_primitives::bytecode::eof::header::EofHeader".
        
        (* Clone *)
        Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              Value.StructRecord
                "revm_primitives::bytecode::eof::header::EofHeader"
                [
                  ("types_size",
                    M.call_closure (|
                      M.get_trait_method (| "core::clone::Clone", Ty.path "u16", [], "clone", [] |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "types_size"
                        |)
                      ]
                    |));
                  ("code_sizes",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::clone::Clone",
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                        [],
                        "clone",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "code_sizes"
                        |)
                      ]
                    |));
                  ("container_sizes",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::clone::Clone",
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                        [],
                        "clone",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "container_sizes"
                        |)
                      ]
                    |));
                  ("data_size",
                    M.call_closure (|
                      M.get_trait_method (| "core::clone::Clone", Ty.path "u16", [], "clone", [] |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "data_size"
                        |)
                      ]
                    |));
                  ("sum_code_sizes",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::clone::Clone",
                        Ty.path "usize",
                        [],
                        "clone",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "sum_code_sizes"
                        |)
                      ]
                    |));
                  ("sum_container_sizes",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::clone::Clone",
                        Ty.path "usize",
                        [],
                        "clone",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "sum_container_sizes"
                        |)
                      ]
                    |))
                ]))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          M.IsTraitInstance
            "core::clone::Clone"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [ ("clone", InstanceField.Method clone) ].
      End Impl_core_clone_Clone_for_revm_primitives_bytecode_eof_header_EofHeader.
      
      Module Impl_core_fmt_Debug_for_revm_primitives_bytecode_eof_header_EofHeader.
        Definition Self : Ty.t := Ty.path "revm_primitives::bytecode::eof::header::EofHeader".
        
        (* Debug *)
        Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          match ε, τ, α with
          | [], [], [ self; f ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let f := M.alloc (| f |) in
              M.read (|
                let~ names :=
                  M.alloc (|
                    M.alloc (|
                      Value.Array
                        [
                          M.read (| Value.String "types_size" |);
                          M.read (| Value.String "code_sizes" |);
                          M.read (| Value.String "container_sizes" |);
                          M.read (| Value.String "data_size" |);
                          M.read (| Value.String "sum_code_sizes" |);
                          M.read (| Value.String "sum_container_sizes" |)
                        ]
                    |)
                  |) in
                let~ values :=
                  M.alloc (|
                    M.alloc (|
                      Value.Array
                        [
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "revm_primitives::bytecode::eof::header::EofHeader",
                            "types_size"
                          |);
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "revm_primitives::bytecode::eof::header::EofHeader",
                            "code_sizes"
                          |);
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "revm_primitives::bytecode::eof::header::EofHeader",
                            "container_sizes"
                          |);
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "revm_primitives::bytecode::eof::header::EofHeader",
                            "data_size"
                          |);
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "revm_primitives::bytecode::eof::header::EofHeader",
                            "sum_code_sizes"
                          |);
                          M.alloc (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm_primitives::bytecode::eof::header::EofHeader",
                              "sum_container_sizes"
                            |)
                          |)
                        ]
                    |)
                  |) in
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "core::fmt::Formatter",
                      "debug_struct_fields_finish",
                      []
                    |),
                    [
                      M.read (| f |);
                      M.read (| Value.String "EofHeader" |);
                      M.read (| names |);
                      M.read (| values |)
                    ]
                  |)
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          M.IsTraitInstance
            "core::fmt::Debug"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
      End Impl_core_fmt_Debug_for_revm_primitives_bytecode_eof_header_EofHeader.
      
      Module Impl_core_default_Default_for_revm_primitives_bytecode_eof_header_EofHeader.
        Definition Self : Ty.t := Ty.path "revm_primitives::bytecode::eof::header::EofHeader".
        
        (* Default *)
        Definition default (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          match ε, τ, α with
          | [], [], [] =>
            ltac:(M.monadic
              (Value.StructRecord
                "revm_primitives::bytecode::eof::header::EofHeader"
                [
                  ("types_size",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::default::Default",
                        Ty.path "u16",
                        [],
                        "default",
                        []
                      |),
                      []
                    |));
                  ("code_sizes",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::default::Default",
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                        [],
                        "default",
                        []
                      |),
                      []
                    |));
                  ("container_sizes",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::default::Default",
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                        [],
                        "default",
                        []
                      |),
                      []
                    |));
                  ("data_size",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::default::Default",
                        Ty.path "u16",
                        [],
                        "default",
                        []
                      |),
                      []
                    |));
                  ("sum_code_sizes",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::default::Default",
                        Ty.path "usize",
                        [],
                        "default",
                        []
                      |),
                      []
                    |));
                  ("sum_container_sizes",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::default::Default",
                        Ty.path "usize",
                        [],
                        "default",
                        []
                      |),
                      []
                    |))
                ]))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          M.IsTraitInstance
            "core::default::Default"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [ ("default", InstanceField.Method default) ].
      End Impl_core_default_Default_for_revm_primitives_bytecode_eof_header_EofHeader.
      
      Module Impl_core_marker_StructuralPartialEq_for_revm_primitives_bytecode_eof_header_EofHeader.
        Definition Self : Ty.t := Ty.path "revm_primitives::bytecode::eof::header::EofHeader".
        
        Axiom Implements :
          M.IsTraitInstance
            "core::marker::StructuralPartialEq"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_marker_StructuralPartialEq_for_revm_primitives_bytecode_eof_header_EofHeader.
      
      Module Impl_core_cmp_PartialEq_for_revm_primitives_bytecode_eof_header_EofHeader.
        Definition Self : Ty.t := Ty.path "revm_primitives::bytecode::eof::header::EofHeader".
        
        (* PartialEq *)
        Definition eq (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          match ε, τ, α with
          | [], [], [ self; other ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let other := M.alloc (| other |) in
              LogicalOp.and (|
                LogicalOp.and (|
                  LogicalOp.and (|
                    LogicalOp.and (|
                      LogicalOp.and (|
                        BinOp.eq (|
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm_primitives::bytecode::eof::header::EofHeader",
                              "types_size"
                            |)
                          |),
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| other |),
                              "revm_primitives::bytecode::eof::header::EofHeader",
                              "types_size"
                            |)
                          |)
                        |),
                        ltac:(M.monadic
                          (M.call_closure (|
                            M.get_trait_method (|
                              "core::cmp::PartialEq",
                              Ty.apply
                                (Ty.path "alloc::vec::Vec")
                                []
                                [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ]
                              ],
                              "eq",
                              []
                            |),
                            [
                              M.SubPointer.get_struct_record_field (|
                                M.read (| self |),
                                "revm_primitives::bytecode::eof::header::EofHeader",
                                "code_sizes"
                              |);
                              M.SubPointer.get_struct_record_field (|
                                M.read (| other |),
                                "revm_primitives::bytecode::eof::header::EofHeader",
                                "code_sizes"
                              |)
                            ]
                          |)))
                      |),
                      ltac:(M.monadic
                        (M.call_closure (|
                          M.get_trait_method (|
                            "core::cmp::PartialEq",
                            Ty.apply
                              (Ty.path "alloc::vec::Vec")
                              []
                              [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                            [
                              Ty.apply
                                (Ty.path "alloc::vec::Vec")
                                []
                                [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ]
                            ],
                            "eq",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm_primitives::bytecode::eof::header::EofHeader",
                              "container_sizes"
                            |);
                            M.SubPointer.get_struct_record_field (|
                              M.read (| other |),
                              "revm_primitives::bytecode::eof::header::EofHeader",
                              "container_sizes"
                            |)
                          ]
                        |)))
                    |),
                    ltac:(M.monadic
                      (BinOp.eq (|
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "revm_primitives::bytecode::eof::header::EofHeader",
                            "data_size"
                          |)
                        |),
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            M.read (| other |),
                            "revm_primitives::bytecode::eof::header::EofHeader",
                            "data_size"
                          |)
                        |)
                      |)))
                  |),
                  ltac:(M.monadic
                    (BinOp.eq (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "sum_code_sizes"
                        |)
                      |),
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| other |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "sum_code_sizes"
                        |)
                      |)
                    |)))
                |),
                ltac:(M.monadic
                  (BinOp.eq (|
                    M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "revm_primitives::bytecode::eof::header::EofHeader",
                        "sum_container_sizes"
                      |)
                    |),
                    M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| other |),
                        "revm_primitives::bytecode::eof::header::EofHeader",
                        "sum_container_sizes"
                      |)
                    |)
                  |)))
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          M.IsTraitInstance
            "core::cmp::PartialEq"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [ ("eq", InstanceField.Method eq) ].
      End Impl_core_cmp_PartialEq_for_revm_primitives_bytecode_eof_header_EofHeader.
      
      Module Impl_core_cmp_Eq_for_revm_primitives_bytecode_eof_header_EofHeader.
        Definition Self : Ty.t := Ty.path "revm_primitives::bytecode::eof::header::EofHeader".
        
        (* Eq *)
        Definition assert_receiver_is_total_eq
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                M.match_operator (|
                  Value.DeclaredButUndefined,
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (M.match_operator (|
                          Value.DeclaredButUndefined,
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (M.match_operator (|
                                  Value.DeclaredButUndefined,
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (M.match_operator (|
                                          Value.DeclaredButUndefined,
                                          [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                          ]
                                        |)))
                                  ]
                                |)))
                          ]
                        |)))
                  ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          M.IsTraitInstance
            "core::cmp::Eq"
            Self
            (* Trait polymorphic types *) []
            (* Instance *)
            [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ].
      End Impl_core_cmp_Eq_for_revm_primitives_bytecode_eof_header_EofHeader.
      
      Module Impl_core_hash_Hash_for_revm_primitives_bytecode_eof_header_EofHeader.
        Definition Self : Ty.t := Ty.path "revm_primitives::bytecode::eof::header::EofHeader".
        
        (* Hash *)
        Definition hash (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          match ε, τ, α with
          | [], [ __H ], [ self; state ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let state := M.alloc (| state |) in
              M.read (|
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::hash::Hash",
                        Ty.path "u16",
                        [],
                        "hash",
                        [ __H ]
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "types_size"
                        |);
                        M.read (| state |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::hash::Hash",
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                        [],
                        "hash",
                        [ __H ]
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "code_sizes"
                        |);
                        M.read (| state |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::hash::Hash",
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                        [],
                        "hash",
                        [ __H ]
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "container_sizes"
                        |);
                        M.read (| state |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::hash::Hash",
                        Ty.path "u16",
                        [],
                        "hash",
                        [ __H ]
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "data_size"
                        |);
                        M.read (| state |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::hash::Hash",
                        Ty.path "usize",
                        [],
                        "hash",
                        [ __H ]
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm_primitives::bytecode::eof::header::EofHeader",
                          "sum_code_sizes"
                        |);
                        M.read (| state |)
                      ]
                    |)
                  |) in
                M.alloc (|
                  M.call_closure (|
                    M.get_trait_method (|
                      "core::hash::Hash",
                      Ty.path "usize",
                      [],
                      "hash",
                      [ __H ]
                    |),
                    [
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "revm_primitives::bytecode::eof::header::EofHeader",
                        "sum_container_sizes"
                      |);
                      M.read (| state |)
                    ]
                  |)
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          M.IsTraitInstance
            "core::hash::Hash"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [ ("hash", InstanceField.Method hash) ].
      End Impl_core_hash_Hash_for_revm_primitives_bytecode_eof_header_EofHeader.
      
      Definition value_KIND_TERMINAL : Value.t :=
        M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U8 0 |))).
      
      Definition value_KIND_TYPES : Value.t :=
        M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U8 1 |))).
      
      Definition value_KIND_CODE : Value.t :=
        M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U8 2 |))).
      
      Definition value_KIND_CONTAINER : Value.t :=
        M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U8 3 |))).
      
      Definition value_KIND_DATA : Value.t :=
        M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U8 4 |))).
      
      (*
      fn consume_header_section_size(input: &[u8]) -> Result<(&[u8], Vec<u16>, usize), EofDecodeError> {
          // num_sections	2 bytes	0x0001-0xFFFF
          // 16-bit unsigned big-endian integer denoting the number of the sections
          let (input, num_sections) = consume_u16(input)?;
          if num_sections == 0 {
              return Err(EofDecodeError::NonSizes);
          }
          let byte_size = (num_sections * 2) as usize;
          if input.len() < byte_size {
              return Err(EofDecodeError::ShortInputForSizes);
          }
          let mut sizes = Vec::with_capacity(num_sections as usize);
          let mut sum = 0;
          for i in 0..num_sections as usize {
              // size	2 bytes	0x0001-0xFFFF
              // 16-bit unsigned big-endian integer denoting the length of the section content
              let code_size = u16::from_be_bytes([input[i * 2], input[i * 2 + 1]]);
              if code_size == 0 {
                  return Err(EofDecodeError::ZeroSize);
              }
              sum += code_size as usize;
              sizes.push(code_size);
          }
      
          Ok((&input[byte_size..], sizes, sum))
      }
      *)
      Definition consume_header_section_size
          (ε : list Value.t)
          (τ : list Ty.t)
          (α : list Value.t)
          : M :=
        match ε, τ, α with
        | [], [], [ input ] =>
          ltac:(M.monadic
            (let input := M.alloc (| input |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  M.match_operator (|
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              []
                              [
                                Ty.tuple
                                  [
                                    Ty.apply
                                      (Ty.path "&")
                                      []
                                      [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ] ];
                                    Ty.path "u16"
                                  ];
                                Ty.path "revm_primitives::bytecode::eof::EofDecodeError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (|
                                "revm_primitives::bytecode::eof::decode_helpers::consume_u16",
                                []
                              |),
                              [ M.read (| input |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.tuple
                                              [
                                                Ty.apply
                                                  (Ty.path "&")
                                                  []
                                                  [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ]
                                                  ];
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ];
                                                Ty.path "usize"
                                              ];
                                            Ty.path "revm_primitives::bytecode::eof::EofDecodeError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            []
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path
                                                "revm_primitives::bytecode::eof::EofDecodeError"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                          let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                          let input := M.copy (| γ0_0 |) in
                          let num_sections := M.copy (| γ0_1 |) in
                          let~ _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          BinOp.eq (|
                                            M.read (| num_sections |),
                                            Value.Integer IntegerKind.U16 0
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          M.return_ (|
                                            Value.StructTuple
                                              "core::result::Result::Err"
                                              [
                                                Value.StructTuple
                                                  "revm_primitives::bytecode::eof::EofDecodeError::NonSizes"
                                                  []
                                              ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          let~ byte_size :=
                            M.alloc (|
                              M.rust_cast
                                (BinOp.Wrap.mul (|
                                  M.read (| num_sections |),
                                  Value.Integer IntegerKind.U16 2
                                |))
                            |) in
                          let~ _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          BinOp.lt (|
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ],
                                                "len",
                                                []
                                              |),
                                              [ M.read (| input |) ]
                                            |),
                                            M.read (| byte_size |)
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          M.return_ (|
                                            Value.StructTuple
                                              "core::result::Result::Err"
                                              [
                                                Value.StructTuple
                                                  "revm_primitives::bytecode::eof::EofDecodeError::ShortInputForSizes"
                                                  []
                                              ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          let~ sizes :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    []
                                    [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                                  "with_capacity",
                                  []
                                |),
                                [ M.rust_cast (M.read (| num_sections |)) ]
                              |)
                            |) in
                          let~ sum := M.alloc (| Value.Integer IntegerKind.Usize 0 |) in
                          let~ _ :=
                            M.use
                              (M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::traits::collect::IntoIterator",
                                      Ty.apply
                                        (Ty.path "core::ops::range::Range")
                                        []
                                        [ Ty.path "usize" ],
                                      [],
                                      "into_iter",
                                      []
                                    |),
                                    [
                                      Value.StructRecord
                                        "core::ops::range::Range"
                                        [
                                          ("start", Value.Integer IntegerKind.Usize 0);
                                          ("end_", M.rust_cast (M.read (| num_sections |)))
                                        ]
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let iter := M.copy (| γ |) in
                                      M.loop (|
                                        ltac:(M.monadic
                                          (let~ _ :=
                                            M.match_operator (|
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::iter::traits::iterator::Iterator",
                                                    Ty.apply
                                                      (Ty.path "core::ops::range::Range")
                                                      []
                                                      [ Ty.path "usize" ],
                                                    [],
                                                    "next",
                                                    []
                                                  |),
                                                  [ iter ]
                                                |)
                                              |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let _ :=
                                                      M.is_struct_tuple (|
                                                        γ,
                                                        "core::option::Option::None"
                                                      |) in
                                                    M.alloc (|
                                                      M.never_to_any (| M.read (| M.break (||) |) |)
                                                    |)));
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::option::Option::Some",
                                                        0
                                                      |) in
                                                    let i := M.copy (| γ0_0 |) in
                                                    let~ code_size :=
                                                      M.alloc (|
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path "u16",
                                                            "from_be_bytes",
                                                            []
                                                          |),
                                                          [
                                                            Value.Array
                                                              [
                                                                M.read (|
                                                                  M.SubPointer.get_array_field (|
                                                                    M.read (| input |),
                                                                    M.alloc (|
                                                                      BinOp.Wrap.mul (|
                                                                        M.read (| i |),
                                                                        Value.Integer
                                                                          IntegerKind.Usize
                                                                          2
                                                                      |)
                                                                    |)
                                                                  |)
                                                                |);
                                                                M.read (|
                                                                  M.SubPointer.get_array_field (|
                                                                    M.read (| input |),
                                                                    M.alloc (|
                                                                      BinOp.Wrap.add (|
                                                                        BinOp.Wrap.mul (|
                                                                          M.read (| i |),
                                                                          Value.Integer
                                                                            IntegerKind.Usize
                                                                            2
                                                                        |),
                                                                        Value.Integer
                                                                          IntegerKind.Usize
                                                                          1
                                                                      |)
                                                                    |)
                                                                  |)
                                                                |)
                                                              ]
                                                          ]
                                                        |)
                                                      |) in
                                                    let~ _ :=
                                                      M.match_operator (|
                                                        M.alloc (| Value.Tuple [] |),
                                                        [
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let γ :=
                                                                M.use
                                                                  (M.alloc (|
                                                                    BinOp.eq (|
                                                                      M.read (| code_size |),
                                                                      Value.Integer
                                                                        IntegerKind.U16
                                                                        0
                                                                    |)
                                                                  |)) in
                                                              let _ :=
                                                                M.is_constant_or_break_match (|
                                                                  M.read (| γ |),
                                                                  Value.Bool true
                                                                |) in
                                                              M.alloc (|
                                                                M.never_to_any (|
                                                                  M.read (|
                                                                    M.return_ (|
                                                                      Value.StructTuple
                                                                        "core::result::Result::Err"
                                                                        [
                                                                          Value.StructTuple
                                                                            "revm_primitives::bytecode::eof::EofDecodeError::ZeroSize"
                                                                            []
                                                                        ]
                                                                    |)
                                                                  |)
                                                                |)
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (M.alloc (| Value.Tuple [] |)))
                                                        ]
                                                      |) in
                                                    let~ _ :=
                                                      let β := sum in
                                                      M.write (|
                                                        β,
                                                        BinOp.Wrap.add (|
                                                          M.read (| β |),
                                                          M.rust_cast (M.read (| code_size |))
                                                        |)
                                                      |) in
                                                    let~ _ :=
                                                      M.alloc (|
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.apply
                                                              (Ty.path "alloc::vec::Vec")
                                                              []
                                                              [
                                                                Ty.path "u16";
                                                                Ty.path "alloc::alloc::Global"
                                                              ],
                                                            "push",
                                                            []
                                                          |),
                                                          [ sizes; M.read (| code_size |) ]
                                                        |)
                                                      |) in
                                                    M.alloc (| Value.Tuple [] |)))
                                              ]
                                            |) in
                                          M.alloc (| Value.Tuple [] |)))
                                      |)))
                                ]
                              |)) in
                          M.alloc (|
                            Value.StructTuple
                              "core::result::Result::Ok"
                              [
                                Value.Tuple
                                  [
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::index::Index",
                                        Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::ops::range::RangeFrom")
                                            []
                                            [ Ty.path "usize" ]
                                        ],
                                        "index",
                                        []
                                      |),
                                      [
                                        M.read (| input |);
                                        Value.StructRecord
                                          "core::ops::range::RangeFrom"
                                          [ ("start", M.read (| byte_size |)) ]
                                      ]
                                    |);
                                    M.read (| sizes |);
                                    M.read (| sum |)
                                  ]
                              ]
                          |)))
                    ]
                  |)
                |)))
            |)))
        | _, _, _ => M.impossible "wrong number of arguments"
        end.
      
      Axiom Function_consume_header_section_size :
        M.IsFunction
          "revm_primitives::bytecode::eof::header::consume_header_section_size"
          consume_header_section_size.
      
      Module Impl_revm_primitives_bytecode_eof_header_EofHeader.
        Definition Self : Ty.t := Ty.path "revm_primitives::bytecode::eof::header::EofHeader".
        
        (*
            pub fn size(&self) -> usize {
                let optional_container_sizes = if self.container_sizes.is_empty() {
                    0
                } else {
                    3 + self.container_sizes.len() * 2
                };
                13 + self.code_sizes.len() * 2 + optional_container_sizes
            }
        *)
        Definition size (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                let~ optional_container_sizes :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "alloc::vec::Vec")
                                        []
                                        [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                                      "is_empty",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "revm_primitives::bytecode::eof::header::EofHeader",
                                        "container_sizes"
                                      |)
                                    ]
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            M.alloc (| Value.Integer IntegerKind.Usize 0 |)));
                        fun γ =>
                          ltac:(M.monadic
                            (M.alloc (|
                              BinOp.Wrap.add (|
                                Value.Integer IntegerKind.Usize 3,
                                BinOp.Wrap.mul (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "alloc::vec::Vec")
                                        []
                                        [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                                      "len",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "revm_primitives::bytecode::eof::header::EofHeader",
                                        "container_sizes"
                                      |)
                                    ]
                                  |),
                                  Value.Integer IntegerKind.Usize 2
                                |)
                              |)
                            |)))
                      ]
                    |)
                  |) in
                M.alloc (|
                  BinOp.Wrap.add (|
                    BinOp.Wrap.add (|
                      Value.Integer IntegerKind.Usize 13,
                      BinOp.Wrap.mul (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "alloc::vec::Vec")
                              []
                              [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                            "len",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm_primitives::bytecode::eof::header::EofHeader",
                              "code_sizes"
                            |)
                          ]
                        |),
                        Value.Integer IntegerKind.Usize 2
                      |)
                    |),
                    M.read (| optional_container_sizes |)
                  |)
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_size : M.IsAssociatedFunction Self "size" size.
        
        (*
            pub fn types_count(&self) -> usize {
                self.types_size as usize / 4
            }
        *)
        Definition types_count (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              BinOp.Wrap.div (|
                M.rust_cast
                  (M.read (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm_primitives::bytecode::eof::header::EofHeader",
                      "types_size"
                    |)
                  |)),
                Value.Integer IntegerKind.Usize 4
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_types_count :
          M.IsAssociatedFunction Self "types_count" types_count.
        
        (*
            pub fn body_size(&self) -> usize {
                self.sum_code_sizes + self.sum_container_sizes + self.data_size as usize
            }
        *)
        Definition body_size (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              BinOp.Wrap.add (|
                BinOp.Wrap.add (|
                  M.read (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm_primitives::bytecode::eof::header::EofHeader",
                      "sum_code_sizes"
                    |)
                  |),
                  M.read (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm_primitives::bytecode::eof::header::EofHeader",
                      "sum_container_sizes"
                    |)
                  |)
                |),
                M.rust_cast
                  (M.read (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm_primitives::bytecode::eof::header::EofHeader",
                      "data_size"
                    |)
                  |))
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_body_size : M.IsAssociatedFunction Self "body_size" body_size.
        
        (*
            pub fn eof_size(&self) -> usize {
                self.size() + self.body_size()
            }
        *)
        Definition eof_size (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              BinOp.Wrap.add (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "revm_primitives::bytecode::eof::header::EofHeader",
                    "size",
                    []
                  |),
                  [ M.read (| self |) ]
                |),
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "revm_primitives::bytecode::eof::header::EofHeader",
                    "body_size",
                    []
                  |),
                  [ M.read (| self |) ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_eof_size : M.IsAssociatedFunction Self "eof_size" eof_size.
        
        (*
            pub fn encode(&self, buffer: &mut Vec<u8>) {
                // magic	2 bytes	0xEF00	EOF prefix
                buffer.extend_from_slice(&0xEF00u16.to_be_bytes());
                // version	1 byte	0x01	EOF version
                buffer.push(0x01);
                // kind_types	1 byte	0x01	kind marker for types size section
                buffer.push(KIND_TYPES);
                // types_size	2 bytes	0x0004-0xFFFF
                buffer.extend_from_slice(&self.types_size.to_be_bytes());
                // kind_code	1 byte	0x02	kind marker for code size section
                buffer.push(KIND_CODE);
                // code_sections_sizes
                buffer.extend_from_slice(&(self.code_sizes.len() as u16).to_be_bytes());
                for size in &self.code_sizes {
                    buffer.extend_from_slice(&size.to_be_bytes());
                }
                // kind_container_or_data	1 byte	0x03 or 0x04	kind marker for container size section or data size section
                if self.container_sizes.is_empty() {
                    buffer.push(KIND_DATA);
                } else {
                    buffer.push(KIND_CONTAINER);
                    // container_sections_sizes
                    buffer.extend_from_slice(&(self.container_sizes.len() as u16).to_be_bytes());
                    for size in &self.container_sizes {
                        buffer.extend_from_slice(&size.to_be_bytes());
                    }
                    // kind_data	1 byte	0x04	kind marker for data size section
                    buffer.push(KIND_DATA);
                }
                // data_size	2 bytes	0x0000-0xFFFF	16-bit unsigned big-endian integer denoting the length of the data section content
                buffer.extend_from_slice(&self.data_size.to_be_bytes());
                // terminator	1 byte	0x00	marks the end of the EofHeader
                buffer.push(KIND_TERMINAL);
            }
        *)
        Definition encode (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          match ε, τ, α with
          | [], [], [ self; buffer ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let buffer := M.alloc (| buffer |) in
              M.read (|
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                        "extend_from_slice",
                        []
                      |),
                      [
                        M.read (| buffer |);
                        M.alloc (|
                          M.call_closure (|
                            M.get_associated_function (| Ty.path "u16", "to_be_bytes", [] |),
                            [ Value.Integer IntegerKind.U16 61184 ]
                          |)
                        |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                        "push",
                        []
                      |),
                      [ M.read (| buffer |); Value.Integer IntegerKind.U8 1 ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                        "push",
                        []
                      |),
                      [
                        M.read (| buffer |);
                        M.read (|
                          M.get_constant (| "revm_primitives::bytecode::eof::header::KIND_TYPES" |)
                        |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                        "extend_from_slice",
                        []
                      |),
                      [
                        M.read (| buffer |);
                        M.alloc (|
                          M.call_closure (|
                            M.get_associated_function (| Ty.path "u16", "to_be_bytes", [] |),
                            [
                              M.read (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "revm_primitives::bytecode::eof::header::EofHeader",
                                  "types_size"
                                |)
                              |)
                            ]
                          |)
                        |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                        "push",
                        []
                      |),
                      [
                        M.read (| buffer |);
                        M.read (|
                          M.get_constant (| "revm_primitives::bytecode::eof::header::KIND_CODE" |)
                        |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                        "extend_from_slice",
                        []
                      |),
                      [
                        M.read (| buffer |);
                        M.alloc (|
                          M.call_closure (|
                            M.get_associated_function (| Ty.path "u16", "to_be_bytes", [] |),
                            [
                              M.rust_cast
                                (M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                                    "len",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "revm_primitives::bytecode::eof::header::EofHeader",
                                      "code_sizes"
                                    |)
                                  ]
                                |))
                            ]
                          |)
                        |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.use
                    (M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::traits::collect::IntoIterator",
                            Ty.apply
                              (Ty.path "&")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ]
                              ],
                            [],
                            "into_iter",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm_primitives::bytecode::eof::header::EofHeader",
                              "code_sizes"
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let iter := M.copy (| γ |) in
                            M.loop (|
                              ltac:(M.monadic
                                (let~ _ :=
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::iter::traits::iterator::Iterator",
                                          Ty.apply
                                            (Ty.path "core::slice::iter::Iter")
                                            []
                                            [ Ty.path "u16" ],
                                          [],
                                          "next",
                                          []
                                        |),
                                        [ iter ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let _ :=
                                            M.is_struct_tuple (|
                                              γ,
                                              "core::option::Option::None"
                                            |) in
                                          M.alloc (|
                                            M.never_to_any (| M.read (| M.break (||) |) |)
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::option::Option::Some",
                                              0
                                            |) in
                                          let size := M.copy (| γ0_0 |) in
                                          let~ _ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "alloc::vec::Vec")
                                                    []
                                                    [ Ty.path "u8"; Ty.path "alloc::alloc::Global"
                                                    ],
                                                  "extend_from_slice",
                                                  []
                                                |),
                                                [
                                                  M.read (| buffer |);
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path "u16",
                                                        "to_be_bytes",
                                                        []
                                                      |),
                                                      [ M.read (| M.read (| size |) |) ]
                                                    |)
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |) in
                                M.alloc (| Value.Tuple [] |)))
                            |)))
                      ]
                    |)) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                                    "is_empty",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "revm_primitives::bytecode::eof::header::EofHeader",
                                      "container_sizes"
                                    |)
                                  ]
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let~ _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    []
                                    [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                                  "push",
                                  []
                                |),
                                [
                                  M.read (| buffer |);
                                  M.read (|
                                    M.get_constant (|
                                      "revm_primitives::bytecode::eof::header::KIND_DATA"
                                    |)
                                  |)
                                ]
                              |)
                            |) in
                          M.alloc (| Value.Tuple [] |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let~ _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    []
                                    [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                                  "push",
                                  []
                                |),
                                [
                                  M.read (| buffer |);
                                  M.read (|
                                    M.get_constant (|
                                      "revm_primitives::bytecode::eof::header::KIND_CONTAINER"
                                    |)
                                  |)
                                ]
                              |)
                            |) in
                          let~ _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    []
                                    [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                                  "extend_from_slice",
                                  []
                                |),
                                [
                                  M.read (| buffer |);
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "u16",
                                        "to_be_bytes",
                                        []
                                      |),
                                      [
                                        M.rust_cast
                                          (M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "alloc::vec::Vec")
                                                []
                                                [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ],
                                              "len",
                                              []
                                            |),
                                            [
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| self |),
                                                "revm_primitives::bytecode::eof::header::EofHeader",
                                                "container_sizes"
                                              |)
                                            ]
                                          |))
                                      ]
                                    |)
                                  |)
                                ]
                              |)
                            |) in
                          let~ _ :=
                            M.use
                              (M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::traits::collect::IntoIterator",
                                      Ty.apply
                                        (Ty.path "&")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "alloc::vec::Vec")
                                            []
                                            [ Ty.path "u16"; Ty.path "alloc::alloc::Global" ]
                                        ],
                                      [],
                                      "into_iter",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "revm_primitives::bytecode::eof::header::EofHeader",
                                        "container_sizes"
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let iter := M.copy (| γ |) in
                                      M.loop (|
                                        ltac:(M.monadic
                                          (let~ _ :=
                                            M.match_operator (|
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::iter::traits::iterator::Iterator",
                                                    Ty.apply
                                                      (Ty.path "core::slice::iter::Iter")
                                                      []
                                                      [ Ty.path "u16" ],
                                                    [],
                                                    "next",
                                                    []
                                                  |),
                                                  [ iter ]
                                                |)
                                              |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let _ :=
                                                      M.is_struct_tuple (|
                                                        γ,
                                                        "core::option::Option::None"
                                                      |) in
                                                    M.alloc (|
                                                      M.never_to_any (| M.read (| M.break (||) |) |)
                                                    |)));
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::option::Option::Some",
                                                        0
                                                      |) in
                                                    let size := M.copy (| γ0_0 |) in
                                                    let~ _ :=
                                                      M.alloc (|
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.apply
                                                              (Ty.path "alloc::vec::Vec")
                                                              []
                                                              [
                                                                Ty.path "u8";
                                                                Ty.path "alloc::alloc::Global"
                                                              ],
                                                            "extend_from_slice",
                                                            []
                                                          |),
                                                          [
                                                            M.read (| buffer |);
                                                            M.alloc (|
                                                              M.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path "u16",
                                                                  "to_be_bytes",
                                                                  []
                                                                |),
                                                                [ M.read (| M.read (| size |) |) ]
                                                              |)
                                                            |)
                                                          ]
                                                        |)
                                                      |) in
                                                    M.alloc (| Value.Tuple [] |)))
                                              ]
                                            |) in
                                          M.alloc (| Value.Tuple [] |)))
                                      |)))
                                ]
                              |)) in
                          let~ _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    []
                                    [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                                  "push",
                                  []
                                |),
                                [
                                  M.read (| buffer |);
                                  M.read (|
                                    M.get_constant (|
                                      "revm_primitives::bytecode::eof::header::KIND_DATA"
                                    |)
                                  |)
                                ]
                              |)
                            |) in
                          M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                        "extend_from_slice",
                        []
                      |),
                      [
                        M.read (| buffer |);
                        M.alloc (|
                          M.call_closure (|
                            M.get_associated_function (| Ty.path "u16", "to_be_bytes", [] |),
                            [
                              M.read (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "revm_primitives::bytecode::eof::header::EofHeader",
                                  "data_size"
                                |)
                              |)
                            ]
                          |)
                        |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                        "push",
                        []
                      |),
                      [
                        M.read (| buffer |);
                        M.read (|
                          M.get_constant (|
                            "revm_primitives::bytecode::eof::header::KIND_TERMINAL"
                          |)
                        |)
                      ]
                    |)
                  |) in
                M.alloc (| Value.Tuple [] |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_encode : M.IsAssociatedFunction Self "encode" encode.
        
        (*
            pub fn decode(input: &[u8]) -> Result<(Self, &[u8]), EofDecodeError> {
                let mut header = EofHeader::default();
        
                // magic	2 bytes	0xEF00	EOF prefix
                let (input, kind) = consume_u16(input)?;
                if kind != 0xEF00 {
                    return Err(EofDecodeError::InvalidEOFMagicNumber);
                }
        
                // version	1 byte	0x01	EOF version
                let (input, version) = consume_u8(input)?;
                if version != 0x01 {
                    return Err(EofDecodeError::InvalidEOFVersion);
                }
        
                // kind_types	1 byte	0x01	kind marker for types size section
                let (input, kind_types) = consume_u8(input)?;
                if kind_types != KIND_TYPES {
                    return Err(EofDecodeError::InvalidTypesKind);
                }
        
                // types_size	2 bytes	0x0004-0xFFFF
                // 16-bit unsigned big-endian integer denoting the length of the type section content
                let (input, types_size) = consume_u16(input)?;
                header.types_size = types_size;
        
                if header.types_size % 4 != 0 {
                    return Err(EofDecodeError::InvalidTypesSection);
                }
        
                // kind_code	1 byte	0x02	kind marker for code size section
                let (input, kind_types) = consume_u8(input)?;
                if kind_types != KIND_CODE {
                    return Err(EofDecodeError::InvalidCodeKind);
                }
        
                // code_sections_sizes
                let (input, sizes, sum) = consume_header_section_size(input)?;
        
                if sizes.len() > 1024 {
                    return Err(EofDecodeError::TooManyCodeSections);
                }
        
                if sizes.is_empty() {
                    return Err(EofDecodeError::ZeroCodeSections);
                }
        
                if sizes.len() != (types_size / 4) as usize {
                    return Err(EofDecodeError::MismatchCodeAndTypesSize);
                }
        
                header.code_sizes = sizes;
                header.sum_code_sizes = sum;
        
                let (input, kind_container_or_data) = consume_u8(input)?;
        
                let input = match kind_container_or_data {
                    KIND_CONTAINER => {
                        // container_sections_sizes
                        let (input, sizes, sum) = consume_header_section_size(input)?;
                        // the number of container sections must not exceed 256
                        if sizes.len() > 256 {
                            return Err(EofDecodeError::TooManyContainerSections);
                        }
                        header.container_sizes = sizes;
                        header.sum_container_sizes = sum;
                        let (input, kind_data) = consume_u8(input)?;
                        if kind_data != KIND_DATA {
                            return Err(EofDecodeError::InvalidDataKind);
                        }
                        input
                    }
                    KIND_DATA => input,
                    _ => return Err(EofDecodeError::InvalidKindAfterCode),
                };
        
                // data_size	2 bytes	0x0000-0xFFFF	16-bit
                // unsigned big-endian integer denoting the length
                // of the data section content (for not yet deployed
                // containers this can be more than the actual content, see Data Section Lifecycle)
                let (input, data_size) = consume_u16(input)?;
                header.data_size = data_size;
        
                // terminator	1 byte	0x00	marks the end of the EofHeader
                let (input, terminator) = consume_u8(input)?;
                if terminator != KIND_TERMINAL {
                    return Err(EofDecodeError::InvalidTerminalByte);
                }
        
                Ok((header, input))
            }
        *)
        Definition decode (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          match ε, τ, α with
          | [], [], [ input ] =>
            ltac:(M.monadic
              (let input := M.alloc (| input |) in
              M.catch_return (|
                ltac:(M.monadic
                  (M.read (|
                    let~ header :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::default::Default",
                            Ty.path "revm_primitives::bytecode::eof::header::EofHeader",
                            [],
                            "default",
                            []
                          |),
                          []
                        |)
                      |) in
                    M.match_operator (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                []
                                [
                                  Ty.tuple
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        []
                                        [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ] ];
                                      Ty.path "u16"
                                    ];
                                  Ty.path "revm_primitives::bytecode::eof::EofDecodeError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "revm_primitives::bytecode::eof::decode_helpers::consume_u16",
                                  []
                                |),
                                [ M.read (| input |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            []
                                            [
                                              Ty.tuple
                                                [
                                                  Ty.path
                                                    "revm_primitives::bytecode::eof::header::EofHeader";
                                                  Ty.apply
                                                    (Ty.path "&")
                                                    []
                                                    [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ]
                                                    ]
                                                ];
                                              Ty.path
                                                "revm_primitives::bytecode::eof::EofDecodeError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path
                                                  "revm_primitives::bytecode::eof::EofDecodeError"
                                              ]
                                          ],
                                          "from_residual",
                                          []
                                        |),
                                        [ M.read (| residual |) ]
                                      |)
                                    |)
                                  |)
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Continue",
                                  0
                                |) in
                              let val := M.copy (| γ0_0 |) in
                              val))
                        ]
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                            let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                            let input := M.copy (| γ0_0 |) in
                            let kind := M.copy (| γ0_1 |) in
                            let~ _ :=
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.alloc (|
                                            BinOp.ne (|
                                              M.read (| kind |),
                                              Value.Integer IntegerKind.U16 61184
                                            |)
                                          |)) in
                                      let _ :=
                                        M.is_constant_or_break_match (|
                                          M.read (| γ |),
                                          Value.Bool true
                                        |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              Value.StructTuple
                                                "core::result::Result::Err"
                                                [
                                                  Value.StructTuple
                                                    "revm_primitives::bytecode::eof::EofDecodeError::InvalidEOFMagicNumber"
                                                    []
                                                ]
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            M.match_operator (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.tuple
                                            [
                                              Ty.apply
                                                (Ty.path "&")
                                                []
                                                [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ] ];
                                              Ty.path "u8"
                                            ];
                                          Ty.path "revm_primitives::bytecode::eof::EofDecodeError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "revm_primitives::bytecode::eof::decode_helpers::consume_u8",
                                          []
                                        |),
                                        [ M.read (| input |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    []
                                                    [
                                                      Ty.tuple
                                                        [
                                                          Ty.path
                                                            "revm_primitives::bytecode::eof::header::EofHeader";
                                                          Ty.apply
                                                            (Ty.path "&")
                                                            []
                                                            [
                                                              Ty.apply
                                                                (Ty.path "slice")
                                                                []
                                                                [ Ty.path "u8" ]
                                                            ]
                                                        ];
                                                      Ty.path
                                                        "revm_primitives::bytecode::eof::EofDecodeError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      []
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "revm_primitives::bytecode::eof::EofDecodeError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                                    let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                                    let input := M.copy (| γ0_0 |) in
                                    let version := M.copy (| γ0_1 |) in
                                    let~ _ :=
                                      M.match_operator (|
                                        M.alloc (| Value.Tuple [] |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ :=
                                                M.use
                                                  (M.alloc (|
                                                    BinOp.ne (|
                                                      M.read (| version |),
                                                      Value.Integer IntegerKind.U8 1
                                                    |)
                                                  |)) in
                                              let _ :=
                                                M.is_constant_or_break_match (|
                                                  M.read (| γ |),
                                                  Value.Bool true
                                                |) in
                                              M.alloc (|
                                                M.never_to_any (|
                                                  M.read (|
                                                    M.return_ (|
                                                      Value.StructTuple
                                                        "core::result::Result::Err"
                                                        [
                                                          Value.StructTuple
                                                            "revm_primitives::bytecode::eof::EofDecodeError::InvalidEOFVersion"
                                                            []
                                                        ]
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                        ]
                                      |) in
                                    M.match_operator (|
                                      M.match_operator (|
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::Try",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [
                                                  Ty.tuple
                                                    [
                                                      Ty.apply
                                                        (Ty.path "&")
                                                        []
                                                        [
                                                          Ty.apply
                                                            (Ty.path "slice")
                                                            []
                                                            [ Ty.path "u8" ]
                                                        ];
                                                      Ty.path "u8"
                                                    ];
                                                  Ty.path
                                                    "revm_primitives::bytecode::eof::EofDecodeError"
                                                ],
                                              [],
                                              "branch",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "revm_primitives::bytecode::eof::decode_helpers::consume_u8",
                                                  []
                                                |),
                                                [ M.read (| input |) ]
                                              |)
                                            ]
                                          |)
                                        |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Break",
                                                  0
                                                |) in
                                              let residual := M.copy (| γ0_0 |) in
                                              M.alloc (|
                                                M.never_to_any (|
                                                  M.read (|
                                                    M.return_ (|
                                                      M.call_closure (|
                                                        M.get_trait_method (|
                                                          "core::ops::try_trait::FromResidual",
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.tuple
                                                                [
                                                                  Ty.path
                                                                    "revm_primitives::bytecode::eof::header::EofHeader";
                                                                  Ty.apply
                                                                    (Ty.path "&")
                                                                    []
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path "slice")
                                                                        []
                                                                        [ Ty.path "u8" ]
                                                                    ]
                                                                ];
                                                              Ty.path
                                                                "revm_primitives::bytecode::eof::EofDecodeError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              []
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "revm_primitives::bytecode::eof::EofDecodeError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                  0
                                                |) in
                                              let val := M.copy (| γ0_0 |) in
                                              val))
                                        ]
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                                            let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                                            let input := M.copy (| γ0_0 |) in
                                            let kind_types := M.copy (| γ0_1 |) in
                                            let~ _ :=
                                              M.match_operator (|
                                                M.alloc (| Value.Tuple [] |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ :=
                                                        M.use
                                                          (M.alloc (|
                                                            BinOp.ne (|
                                                              M.read (| kind_types |),
                                                              M.read (|
                                                                M.get_constant (|
                                                                  "revm_primitives::bytecode::eof::header::KIND_TYPES"
                                                                |)
                                                              |)
                                                            |)
                                                          |)) in
                                                      let _ :=
                                                        M.is_constant_or_break_match (|
                                                          M.read (| γ |),
                                                          Value.Bool true
                                                        |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            M.return_ (|
                                                              Value.StructTuple
                                                                "core::result::Result::Err"
                                                                [
                                                                  Value.StructTuple
                                                                    "revm_primitives::bytecode::eof::EofDecodeError::InvalidTypesKind"
                                                                    []
                                                                ]
                                                            |)
                                                          |)
                                                        |)
                                                      |)));
                                                  fun γ =>
                                                    ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                                ]
                                              |) in
                                            M.match_operator (|
                                              M.match_operator (|
                                                M.alloc (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::try_trait::Try",
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.tuple
                                                            [
                                                              Ty.apply
                                                                (Ty.path "&")
                                                                []
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "slice")
                                                                    []
                                                                    [ Ty.path "u8" ]
                                                                ];
                                                              Ty.path "u16"
                                                            ];
                                                          Ty.path
                                                            "revm_primitives::bytecode::eof::EofDecodeError"
                                                        ],
                                                      [],
                                                      "branch",
                                                      []
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_function (|
                                                          "revm_primitives::bytecode::eof::decode_helpers::consume_u16",
                                                          []
                                                        |),
                                                        [ M.read (| input |) ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            M.return_ (|
                                                              M.call_closure (|
                                                                M.get_trait_method (|
                                                                  "core::ops::try_trait::FromResidual",
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.tuple
                                                                        [
                                                                          Ty.path
                                                                            "revm_primitives::bytecode::eof::header::EofHeader";
                                                                          Ty.apply
                                                                            (Ty.path "&")
                                                                            []
                                                                            [
                                                                              Ty.apply
                                                                                (Ty.path "slice")
                                                                                []
                                                                                [ Ty.path "u8" ]
                                                                            ]
                                                                        ];
                                                                      Ty.path
                                                                        "revm_primitives::bytecode::eof::EofDecodeError"
                                                                    ],
                                                                  [
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      []
                                                                      [
                                                                        Ty.path
                                                                          "core::convert::Infallible";
                                                                        Ty.path
                                                                          "revm_primitives::bytecode::eof::EofDecodeError"
                                                                      ]
                                                                  ],
                                                                  "from_residual",
                                                                  []
                                                                |),
                                                                [ M.read (| residual |) ]
                                                              |)
                                                            |)
                                                          |)
                                                        |)
                                                      |)));
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Continue",
                                                          0
                                                        |) in
                                                      let val := M.copy (| γ0_0 |) in
                                                      val))
                                                ]
                                              |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_tuple_field (| γ, 0 |) in
                                                    let γ0_1 :=
                                                      M.SubPointer.get_tuple_field (| γ, 1 |) in
                                                    let input := M.copy (| γ0_0 |) in
                                                    let types_size := M.copy (| γ0_1 |) in
                                                    let~ _ :=
                                                      M.write (|
                                                        M.SubPointer.get_struct_record_field (|
                                                          header,
                                                          "revm_primitives::bytecode::eof::header::EofHeader",
                                                          "types_size"
                                                        |),
                                                        M.read (| types_size |)
                                                      |) in
                                                    let~ _ :=
                                                      M.match_operator (|
                                                        M.alloc (| Value.Tuple [] |),
                                                        [
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let γ :=
                                                                M.use
                                                                  (M.alloc (|
                                                                    BinOp.ne (|
                                                                      BinOp.Wrap.rem (|
                                                                        M.read (|
                                                                          M.SubPointer.get_struct_record_field (|
                                                                            header,
                                                                            "revm_primitives::bytecode::eof::header::EofHeader",
                                                                            "types_size"
                                                                          |)
                                                                        |),
                                                                        Value.Integer
                                                                          IntegerKind.U16
                                                                          4
                                                                      |),
                                                                      Value.Integer
                                                                        IntegerKind.U16
                                                                        0
                                                                    |)
                                                                  |)) in
                                                              let _ :=
                                                                M.is_constant_or_break_match (|
                                                                  M.read (| γ |),
                                                                  Value.Bool true
                                                                |) in
                                                              M.alloc (|
                                                                M.never_to_any (|
                                                                  M.read (|
                                                                    M.return_ (|
                                                                      Value.StructTuple
                                                                        "core::result::Result::Err"
                                                                        [
                                                                          Value.StructTuple
                                                                            "revm_primitives::bytecode::eof::EofDecodeError::InvalidTypesSection"
                                                                            []
                                                                        ]
                                                                    |)
                                                                  |)
                                                                |)
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (M.alloc (| Value.Tuple [] |)))
                                                        ]
                                                      |) in
                                                    M.match_operator (|
                                                      M.match_operator (|
                                                        M.alloc (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::try_trait::Try",
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                []
                                                                [
                                                                  Ty.tuple
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path "&")
                                                                        []
                                                                        [
                                                                          Ty.apply
                                                                            (Ty.path "slice")
                                                                            []
                                                                            [ Ty.path "u8" ]
                                                                        ];
                                                                      Ty.path "u8"
                                                                    ];
                                                                  Ty.path
                                                                    "revm_primitives::bytecode::eof::EofDecodeError"
                                                                ],
                                                              [],
                                                              "branch",
                                                              []
                                                            |),
                                                            [
                                                              M.call_closure (|
                                                                M.get_function (|
                                                                  "revm_primitives::bytecode::eof::decode_helpers::consume_u8",
                                                                  []
                                                                |),
                                                                [ M.read (| input |) ]
                                                              |)
                                                            ]
                                                          |)
                                                        |),
                                                        [
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let γ0_0 :=
                                                                M.SubPointer.get_struct_tuple_field (|
                                                                  γ,
                                                                  "core::ops::control_flow::ControlFlow::Break",
                                                                  0
                                                                |) in
                                                              let residual := M.copy (| γ0_0 |) in
                                                              M.alloc (|
                                                                M.never_to_any (|
                                                                  M.read (|
                                                                    M.return_ (|
                                                                      M.call_closure (|
                                                                        M.get_trait_method (|
                                                                          "core::ops::try_trait::FromResidual",
                                                                          Ty.apply
                                                                            (Ty.path
                                                                              "core::result::Result")
                                                                            []
                                                                            [
                                                                              Ty.tuple
                                                                                [
                                                                                  Ty.path
                                                                                    "revm_primitives::bytecode::eof::header::EofHeader";
                                                                                  Ty.apply
                                                                                    (Ty.path "&")
                                                                                    []
                                                                                    [
                                                                                      Ty.apply
                                                                                        (Ty.path
                                                                                          "slice")
                                                                                        []
                                                                                        [
                                                                                          Ty.path
                                                                                            "u8"
                                                                                        ]
                                                                                    ]
                                                                                ];
                                                                              Ty.path
                                                                                "revm_primitives::bytecode::eof::EofDecodeError"
                                                                            ],
                                                                          [
                                                                            Ty.apply
                                                                              (Ty.path
                                                                                "core::result::Result")
                                                                              []
                                                                              [
                                                                                Ty.path
                                                                                  "core::convert::Infallible";
                                                                                Ty.path
                                                                                  "revm_primitives::bytecode::eof::EofDecodeError"
                                                                              ]
                                                                          ],
                                                                          "from_residual",
                                                                          []
                                                                        |),
                                                                        [ M.read (| residual |) ]
                                                                      |)
                                                                    |)
                                                                  |)
                                                                |)
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let γ0_0 :=
                                                                M.SubPointer.get_struct_tuple_field (|
                                                                  γ,
                                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                                  0
                                                                |) in
                                                              let val := M.copy (| γ0_0 |) in
                                                              val))
                                                        ]
                                                      |),
                                                      [
                                                        fun γ =>
                                                          ltac:(M.monadic
                                                            (let γ0_0 :=
                                                              M.SubPointer.get_tuple_field (|
                                                                γ,
                                                                0
                                                              |) in
                                                            let γ0_1 :=
                                                              M.SubPointer.get_tuple_field (|
                                                                γ,
                                                                1
                                                              |) in
                                                            let input := M.copy (| γ0_0 |) in
                                                            let kind_types := M.copy (| γ0_1 |) in
                                                            let~ _ :=
                                                              M.match_operator (|
                                                                M.alloc (| Value.Tuple [] |),
                                                                [
                                                                  fun γ =>
                                                                    ltac:(M.monadic
                                                                      (let γ :=
                                                                        M.use
                                                                          (M.alloc (|
                                                                            BinOp.ne (|
                                                                              M.read (|
                                                                                kind_types
                                                                              |),
                                                                              M.read (|
                                                                                M.get_constant (|
                                                                                  "revm_primitives::bytecode::eof::header::KIND_CODE"
                                                                                |)
                                                                              |)
                                                                            |)
                                                                          |)) in
                                                                      let _ :=
                                                                        M.is_constant_or_break_match (|
                                                                          M.read (| γ |),
                                                                          Value.Bool true
                                                                        |) in
                                                                      M.alloc (|
                                                                        M.never_to_any (|
                                                                          M.read (|
                                                                            M.return_ (|
                                                                              Value.StructTuple
                                                                                "core::result::Result::Err"
                                                                                [
                                                                                  Value.StructTuple
                                                                                    "revm_primitives::bytecode::eof::EofDecodeError::InvalidCodeKind"
                                                                                    []
                                                                                ]
                                                                            |)
                                                                          |)
                                                                        |)
                                                                      |)));
                                                                  fun γ =>
                                                                    ltac:(M.monadic
                                                                      (M.alloc (|
                                                                        Value.Tuple []
                                                                      |)))
                                                                ]
                                                              |) in
                                                            M.match_operator (|
                                                              M.match_operator (|
                                                                M.alloc (|
                                                                  M.call_closure (|
                                                                    M.get_trait_method (|
                                                                      "core::ops::try_trait::Try",
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.tuple
                                                                            [
                                                                              Ty.apply
                                                                                (Ty.path "&")
                                                                                []
                                                                                [
                                                                                  Ty.apply
                                                                                    (Ty.path
                                                                                      "slice")
                                                                                    []
                                                                                    [ Ty.path "u8" ]
                                                                                ];
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path "u16";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ];
                                                                              Ty.path "usize"
                                                                            ];
                                                                          Ty.path
                                                                            "revm_primitives::bytecode::eof::EofDecodeError"
                                                                        ],
                                                                      [],
                                                                      "branch",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.call_closure (|
                                                                        M.get_function (|
                                                                          "revm_primitives::bytecode::eof::header::consume_header_section_size",
                                                                          []
                                                                        |),
                                                                        [ M.read (| input |) ]
                                                                      |)
                                                                    ]
                                                                  |)
                                                                |),
                                                                [
                                                                  fun γ =>
                                                                    ltac:(M.monadic
                                                                      (let γ0_0 :=
                                                                        M.SubPointer.get_struct_tuple_field (|
                                                                          γ,
                                                                          "core::ops::control_flow::ControlFlow::Break",
                                                                          0
                                                                        |) in
                                                                      let residual :=
                                                                        M.copy (| γ0_0 |) in
                                                                      M.alloc (|
                                                                        M.never_to_any (|
                                                                          M.read (|
                                                                            M.return_ (|
                                                                              M.call_closure (|
                                                                                M.get_trait_method (|
                                                                                  "core::ops::try_trait::FromResidual",
                                                                                  Ty.apply
                                                                                    (Ty.path
                                                                                      "core::result::Result")
                                                                                    []
                                                                                    [
                                                                                      Ty.tuple
                                                                                        [
                                                                                          Ty.path
                                                                                            "revm_primitives::bytecode::eof::header::EofHeader";
                                                                                          Ty.apply
                                                                                            (Ty.path
                                                                                              "&")
                                                                                            []
                                                                                            [
                                                                                              Ty.apply
                                                                                                (Ty.path
                                                                                                  "slice")
                                                                                                []
                                                                                                [
                                                                                                  Ty.path
                                                                                                    "u8"
                                                                                                ]
                                                                                            ]
                                                                                        ];
                                                                                      Ty.path
                                                                                        "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                    ],
                                                                                  [
                                                                                    Ty.apply
                                                                                      (Ty.path
                                                                                        "core::result::Result")
                                                                                      []
                                                                                      [
                                                                                        Ty.path
                                                                                          "core::convert::Infallible";
                                                                                        Ty.path
                                                                                          "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                      ]
                                                                                  ],
                                                                                  "from_residual",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.read (|
                                                                                    residual
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            |)
                                                                          |)
                                                                        |)
                                                                      |)));
                                                                  fun γ =>
                                                                    ltac:(M.monadic
                                                                      (let γ0_0 :=
                                                                        M.SubPointer.get_struct_tuple_field (|
                                                                          γ,
                                                                          "core::ops::control_flow::ControlFlow::Continue",
                                                                          0
                                                                        |) in
                                                                      let val :=
                                                                        M.copy (| γ0_0 |) in
                                                                      val))
                                                                ]
                                                              |),
                                                              [
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let γ0_0 :=
                                                                      M.SubPointer.get_tuple_field (|
                                                                        γ,
                                                                        0
                                                                      |) in
                                                                    let γ0_1 :=
                                                                      M.SubPointer.get_tuple_field (|
                                                                        γ,
                                                                        1
                                                                      |) in
                                                                    let γ0_2 :=
                                                                      M.SubPointer.get_tuple_field (|
                                                                        γ,
                                                                        2
                                                                      |) in
                                                                    let input :=
                                                                      M.copy (| γ0_0 |) in
                                                                    let sizes :=
                                                                      M.copy (| γ0_1 |) in
                                                                    let sum := M.copy (| γ0_2 |) in
                                                                    let~ _ :=
                                                                      M.match_operator (|
                                                                        M.alloc (|
                                                                          Value.Tuple []
                                                                        |),
                                                                        [
                                                                          fun γ =>
                                                                            ltac:(M.monadic
                                                                              (let γ :=
                                                                                M.use
                                                                                  (M.alloc (|
                                                                                    BinOp.gt (|
                                                                                      M.call_closure (|
                                                                                        M.get_associated_function (|
                                                                                          Ty.apply
                                                                                            (Ty.path
                                                                                              "alloc::vec::Vec")
                                                                                            []
                                                                                            [
                                                                                              Ty.path
                                                                                                "u16";
                                                                                              Ty.path
                                                                                                "alloc::alloc::Global"
                                                                                            ],
                                                                                          "len",
                                                                                          []
                                                                                        |),
                                                                                        [ sizes ]
                                                                                      |),
                                                                                      Value.Integer
                                                                                        IntegerKind.Usize
                                                                                        1024
                                                                                    |)
                                                                                  |)) in
                                                                              let _ :=
                                                                                M.is_constant_or_break_match (|
                                                                                  M.read (| γ |),
                                                                                  Value.Bool true
                                                                                |) in
                                                                              M.alloc (|
                                                                                M.never_to_any (|
                                                                                  M.read (|
                                                                                    M.return_ (|
                                                                                      Value.StructTuple
                                                                                        "core::result::Result::Err"
                                                                                        [
                                                                                          Value.StructTuple
                                                                                            "revm_primitives::bytecode::eof::EofDecodeError::TooManyCodeSections"
                                                                                            []
                                                                                        ]
                                                                                    |)
                                                                                  |)
                                                                                |)
                                                                              |)));
                                                                          fun γ =>
                                                                            ltac:(M.monadic
                                                                              (M.alloc (|
                                                                                Value.Tuple []
                                                                              |)))
                                                                        ]
                                                                      |) in
                                                                    let~ _ :=
                                                                      M.match_operator (|
                                                                        M.alloc (|
                                                                          Value.Tuple []
                                                                        |),
                                                                        [
                                                                          fun γ =>
                                                                            ltac:(M.monadic
                                                                              (let γ :=
                                                                                M.use
                                                                                  (M.alloc (|
                                                                                    M.call_closure (|
                                                                                      M.get_associated_function (|
                                                                                        Ty.apply
                                                                                          (Ty.path
                                                                                            "alloc::vec::Vec")
                                                                                          []
                                                                                          [
                                                                                            Ty.path
                                                                                              "u16";
                                                                                            Ty.path
                                                                                              "alloc::alloc::Global"
                                                                                          ],
                                                                                        "is_empty",
                                                                                        []
                                                                                      |),
                                                                                      [ sizes ]
                                                                                    |)
                                                                                  |)) in
                                                                              let _ :=
                                                                                M.is_constant_or_break_match (|
                                                                                  M.read (| γ |),
                                                                                  Value.Bool true
                                                                                |) in
                                                                              M.alloc (|
                                                                                M.never_to_any (|
                                                                                  M.read (|
                                                                                    M.return_ (|
                                                                                      Value.StructTuple
                                                                                        "core::result::Result::Err"
                                                                                        [
                                                                                          Value.StructTuple
                                                                                            "revm_primitives::bytecode::eof::EofDecodeError::ZeroCodeSections"
                                                                                            []
                                                                                        ]
                                                                                    |)
                                                                                  |)
                                                                                |)
                                                                              |)));
                                                                          fun γ =>
                                                                            ltac:(M.monadic
                                                                              (M.alloc (|
                                                                                Value.Tuple []
                                                                              |)))
                                                                        ]
                                                                      |) in
                                                                    let~ _ :=
                                                                      M.match_operator (|
                                                                        M.alloc (|
                                                                          Value.Tuple []
                                                                        |),
                                                                        [
                                                                          fun γ =>
                                                                            ltac:(M.monadic
                                                                              (let γ :=
                                                                                M.use
                                                                                  (M.alloc (|
                                                                                    BinOp.ne (|
                                                                                      M.call_closure (|
                                                                                        M.get_associated_function (|
                                                                                          Ty.apply
                                                                                            (Ty.path
                                                                                              "alloc::vec::Vec")
                                                                                            []
                                                                                            [
                                                                                              Ty.path
                                                                                                "u16";
                                                                                              Ty.path
                                                                                                "alloc::alloc::Global"
                                                                                            ],
                                                                                          "len",
                                                                                          []
                                                                                        |),
                                                                                        [ sizes ]
                                                                                      |),
                                                                                      M.rust_cast
                                                                                        (BinOp.Wrap.div (|
                                                                                          M.read (|
                                                                                            types_size
                                                                                          |),
                                                                                          Value.Integer
                                                                                            IntegerKind.U16
                                                                                            4
                                                                                        |))
                                                                                    |)
                                                                                  |)) in
                                                                              let _ :=
                                                                                M.is_constant_or_break_match (|
                                                                                  M.read (| γ |),
                                                                                  Value.Bool true
                                                                                |) in
                                                                              M.alloc (|
                                                                                M.never_to_any (|
                                                                                  M.read (|
                                                                                    M.return_ (|
                                                                                      Value.StructTuple
                                                                                        "core::result::Result::Err"
                                                                                        [
                                                                                          Value.StructTuple
                                                                                            "revm_primitives::bytecode::eof::EofDecodeError::MismatchCodeAndTypesSize"
                                                                                            []
                                                                                        ]
                                                                                    |)
                                                                                  |)
                                                                                |)
                                                                              |)));
                                                                          fun γ =>
                                                                            ltac:(M.monadic
                                                                              (M.alloc (|
                                                                                Value.Tuple []
                                                                              |)))
                                                                        ]
                                                                      |) in
                                                                    let~ _ :=
                                                                      M.write (|
                                                                        M.SubPointer.get_struct_record_field (|
                                                                          header,
                                                                          "revm_primitives::bytecode::eof::header::EofHeader",
                                                                          "code_sizes"
                                                                        |),
                                                                        M.read (| sizes |)
                                                                      |) in
                                                                    let~ _ :=
                                                                      M.write (|
                                                                        M.SubPointer.get_struct_record_field (|
                                                                          header,
                                                                          "revm_primitives::bytecode::eof::header::EofHeader",
                                                                          "sum_code_sizes"
                                                                        |),
                                                                        M.read (| sum |)
                                                                      |) in
                                                                    M.match_operator (|
                                                                      M.match_operator (|
                                                                        M.alloc (|
                                                                          M.call_closure (|
                                                                            M.get_trait_method (|
                                                                              "core::ops::try_trait::Try",
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "core::result::Result")
                                                                                []
                                                                                [
                                                                                  Ty.tuple
                                                                                    [
                                                                                      Ty.apply
                                                                                        (Ty.path
                                                                                          "&")
                                                                                        []
                                                                                        [
                                                                                          Ty.apply
                                                                                            (Ty.path
                                                                                              "slice")
                                                                                            []
                                                                                            [
                                                                                              Ty.path
                                                                                                "u8"
                                                                                            ]
                                                                                        ];
                                                                                      Ty.path "u8"
                                                                                    ];
                                                                                  Ty.path
                                                                                    "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                ],
                                                                              [],
                                                                              "branch",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.call_closure (|
                                                                                M.get_function (|
                                                                                  "revm_primitives::bytecode::eof::decode_helpers::consume_u8",
                                                                                  []
                                                                                |),
                                                                                [ M.read (| input |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                          |)
                                                                        |),
                                                                        [
                                                                          fun γ =>
                                                                            ltac:(M.monadic
                                                                              (let γ0_0 :=
                                                                                M.SubPointer.get_struct_tuple_field (|
                                                                                  γ,
                                                                                  "core::ops::control_flow::ControlFlow::Break",
                                                                                  0
                                                                                |) in
                                                                              let residual :=
                                                                                M.copy (| γ0_0 |) in
                                                                              M.alloc (|
                                                                                M.never_to_any (|
                                                                                  M.read (|
                                                                                    M.return_ (|
                                                                                      M.call_closure (|
                                                                                        M.get_trait_method (|
                                                                                          "core::ops::try_trait::FromResidual",
                                                                                          Ty.apply
                                                                                            (Ty.path
                                                                                              "core::result::Result")
                                                                                            []
                                                                                            [
                                                                                              Ty.tuple
                                                                                                [
                                                                                                  Ty.path
                                                                                                    "revm_primitives::bytecode::eof::header::EofHeader";
                                                                                                  Ty.apply
                                                                                                    (Ty.path
                                                                                                      "&")
                                                                                                    []
                                                                                                    [
                                                                                                      Ty.apply
                                                                                                        (Ty.path
                                                                                                          "slice")
                                                                                                        []
                                                                                                        [
                                                                                                          Ty.path
                                                                                                            "u8"
                                                                                                        ]
                                                                                                    ]
                                                                                                ];
                                                                                              Ty.path
                                                                                                "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                            ],
                                                                                          [
                                                                                            Ty.apply
                                                                                              (Ty.path
                                                                                                "core::result::Result")
                                                                                              []
                                                                                              [
                                                                                                Ty.path
                                                                                                  "core::convert::Infallible";
                                                                                                Ty.path
                                                                                                  "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                              ]
                                                                                          ],
                                                                                          "from_residual",
                                                                                          []
                                                                                        |),
                                                                                        [
                                                                                          M.read (|
                                                                                            residual
                                                                                          |)
                                                                                        ]
                                                                                      |)
                                                                                    |)
                                                                                  |)
                                                                                |)
                                                                              |)));
                                                                          fun γ =>
                                                                            ltac:(M.monadic
                                                                              (let γ0_0 :=
                                                                                M.SubPointer.get_struct_tuple_field (|
                                                                                  γ,
                                                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                                                  0
                                                                                |) in
                                                                              let val :=
                                                                                M.copy (| γ0_0 |) in
                                                                              val))
                                                                        ]
                                                                      |),
                                                                      [
                                                                        fun γ =>
                                                                          ltac:(M.monadic
                                                                            (let γ0_0 :=
                                                                              M.SubPointer.get_tuple_field (|
                                                                                γ,
                                                                                0
                                                                              |) in
                                                                            let γ0_1 :=
                                                                              M.SubPointer.get_tuple_field (|
                                                                                γ,
                                                                                1
                                                                              |) in
                                                                            let input :=
                                                                              M.copy (| γ0_0 |) in
                                                                            let
                                                                                  kind_container_or_data :=
                                                                              M.copy (| γ0_1 |) in
                                                                            let~ input :=
                                                                              M.copy (|
                                                                                M.match_operator (|
                                                                                  kind_container_or_data,
                                                                                  [
                                                                                    fun γ =>
                                                                                      ltac:(M.monadic
                                                                                        (let _ :=
                                                                                          M.is_constant_or_break_match (|
                                                                                            M.read (|
                                                                                              γ
                                                                                            |),
                                                                                            Value.Integer
                                                                                              IntegerKind.U8
                                                                                              3
                                                                                          |) in
                                                                                        M.match_operator (|
                                                                                          M.match_operator (|
                                                                                            M.alloc (|
                                                                                              M.call_closure (|
                                                                                                M.get_trait_method (|
                                                                                                  "core::ops::try_trait::Try",
                                                                                                  Ty.apply
                                                                                                    (Ty.path
                                                                                                      "core::result::Result")
                                                                                                    []
                                                                                                    [
                                                                                                      Ty.tuple
                                                                                                        [
                                                                                                          Ty.apply
                                                                                                            (Ty.path
                                                                                                              "&")
                                                                                                            []
                                                                                                            [
                                                                                                              Ty.apply
                                                                                                                (Ty.path
                                                                                                                  "slice")
                                                                                                                []
                                                                                                                [
                                                                                                                  Ty.path
                                                                                                                    "u8"
                                                                                                                ]
                                                                                                            ];
                                                                                                          Ty.apply
                                                                                                            (Ty.path
                                                                                                              "alloc::vec::Vec")
                                                                                                            []
                                                                                                            [
                                                                                                              Ty.path
                                                                                                                "u16";
                                                                                                              Ty.path
                                                                                                                "alloc::alloc::Global"
                                                                                                            ];
                                                                                                          Ty.path
                                                                                                            "usize"
                                                                                                        ];
                                                                                                      Ty.path
                                                                                                        "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                                    ],
                                                                                                  [],
                                                                                                  "branch",
                                                                                                  []
                                                                                                |),
                                                                                                [
                                                                                                  M.call_closure (|
                                                                                                    M.get_function (|
                                                                                                      "revm_primitives::bytecode::eof::header::consume_header_section_size",
                                                                                                      []
                                                                                                    |),
                                                                                                    [
                                                                                                      M.read (|
                                                                                                        input
                                                                                                      |)
                                                                                                    ]
                                                                                                  |)
                                                                                                ]
                                                                                              |)
                                                                                            |),
                                                                                            [
                                                                                              fun
                                                                                                  γ =>
                                                                                                ltac:(M.monadic
                                                                                                  (let
                                                                                                        γ0_0 :=
                                                                                                    M.SubPointer.get_struct_tuple_field (|
                                                                                                      γ,
                                                                                                      "core::ops::control_flow::ControlFlow::Break",
                                                                                                      0
                                                                                                    |) in
                                                                                                  let
                                                                                                        residual :=
                                                                                                    M.copy (|
                                                                                                      γ0_0
                                                                                                    |) in
                                                                                                  M.alloc (|
                                                                                                    M.never_to_any (|
                                                                                                      M.read (|
                                                                                                        M.return_ (|
                                                                                                          M.call_closure (|
                                                                                                            M.get_trait_method (|
                                                                                                              "core::ops::try_trait::FromResidual",
                                                                                                              Ty.apply
                                                                                                                (Ty.path
                                                                                                                  "core::result::Result")
                                                                                                                []
                                                                                                                [
                                                                                                                  Ty.tuple
                                                                                                                    [
                                                                                                                      Ty.path
                                                                                                                        "revm_primitives::bytecode::eof::header::EofHeader";
                                                                                                                      Ty.apply
                                                                                                                        (Ty.path
                                                                                                                          "&")
                                                                                                                        []
                                                                                                                        [
                                                                                                                          Ty.apply
                                                                                                                            (Ty.path
                                                                                                                              "slice")
                                                                                                                            []
                                                                                                                            [
                                                                                                                              Ty.path
                                                                                                                                "u8"
                                                                                                                            ]
                                                                                                                        ]
                                                                                                                    ];
                                                                                                                  Ty.path
                                                                                                                    "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                                                ],
                                                                                                              [
                                                                                                                Ty.apply
                                                                                                                  (Ty.path
                                                                                                                    "core::result::Result")
                                                                                                                  []
                                                                                                                  [
                                                                                                                    Ty.path
                                                                                                                      "core::convert::Infallible";
                                                                                                                    Ty.path
                                                                                                                      "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                                                  ]
                                                                                                              ],
                                                                                                              "from_residual",
                                                                                                              []
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                residual
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        |)
                                                                                                      |)
                                                                                                    |)
                                                                                                  |)));
                                                                                              fun
                                                                                                  γ =>
                                                                                                ltac:(M.monadic
                                                                                                  (let
                                                                                                        γ0_0 :=
                                                                                                    M.SubPointer.get_struct_tuple_field (|
                                                                                                      γ,
                                                                                                      "core::ops::control_flow::ControlFlow::Continue",
                                                                                                      0
                                                                                                    |) in
                                                                                                  let
                                                                                                        val :=
                                                                                                    M.copy (|
                                                                                                      γ0_0
                                                                                                    |) in
                                                                                                  val))
                                                                                            ]
                                                                                          |),
                                                                                          [
                                                                                            fun γ =>
                                                                                              ltac:(M.monadic
                                                                                                (let
                                                                                                      γ0_0 :=
                                                                                                  M.SubPointer.get_tuple_field (|
                                                                                                    γ,
                                                                                                    0
                                                                                                  |) in
                                                                                                let
                                                                                                      γ0_1 :=
                                                                                                  M.SubPointer.get_tuple_field (|
                                                                                                    γ,
                                                                                                    1
                                                                                                  |) in
                                                                                                let
                                                                                                      γ0_2 :=
                                                                                                  M.SubPointer.get_tuple_field (|
                                                                                                    γ,
                                                                                                    2
                                                                                                  |) in
                                                                                                let
                                                                                                      input :=
                                                                                                  M.copy (|
                                                                                                    γ0_0
                                                                                                  |) in
                                                                                                let
                                                                                                      sizes :=
                                                                                                  M.copy (|
                                                                                                    γ0_1
                                                                                                  |) in
                                                                                                let
                                                                                                      sum :=
                                                                                                  M.copy (|
                                                                                                    γ0_2
                                                                                                  |) in
                                                                                                let~
                                                                                                      _ :=
                                                                                                  M.match_operator (|
                                                                                                    M.alloc (|
                                                                                                      Value.Tuple
                                                                                                        []
                                                                                                    |),
                                                                                                    [
                                                                                                      fun
                                                                                                          γ =>
                                                                                                        ltac:(M.monadic
                                                                                                          (let
                                                                                                                γ :=
                                                                                                            M.use
                                                                                                              (M.alloc (|
                                                                                                                BinOp.gt (|
                                                                                                                  M.call_closure (|
                                                                                                                    M.get_associated_function (|
                                                                                                                      Ty.apply
                                                                                                                        (Ty.path
                                                                                                                          "alloc::vec::Vec")
                                                                                                                        []
                                                                                                                        [
                                                                                                                          Ty.path
                                                                                                                            "u16";
                                                                                                                          Ty.path
                                                                                                                            "alloc::alloc::Global"
                                                                                                                        ],
                                                                                                                      "len",
                                                                                                                      []
                                                                                                                    |),
                                                                                                                    [
                                                                                                                      sizes
                                                                                                                    ]
                                                                                                                  |),
                                                                                                                  Value.Integer
                                                                                                                    IntegerKind.Usize
                                                                                                                    256
                                                                                                                |)
                                                                                                              |)) in
                                                                                                          let
                                                                                                                _ :=
                                                                                                            M.is_constant_or_break_match (|
                                                                                                              M.read (|
                                                                                                                γ
                                                                                                              |),
                                                                                                              Value.Bool
                                                                                                                true
                                                                                                            |) in
                                                                                                          M.alloc (|
                                                                                                            M.never_to_any (|
                                                                                                              M.read (|
                                                                                                                M.return_ (|
                                                                                                                  Value.StructTuple
                                                                                                                    "core::result::Result::Err"
                                                                                                                    [
                                                                                                                      Value.StructTuple
                                                                                                                        "revm_primitives::bytecode::eof::EofDecodeError::TooManyContainerSections"
                                                                                                                        []
                                                                                                                    ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            |)
                                                                                                          |)));
                                                                                                      fun
                                                                                                          γ =>
                                                                                                        ltac:(M.monadic
                                                                                                          (M.alloc (|
                                                                                                            Value.Tuple
                                                                                                              []
                                                                                                          |)))
                                                                                                    ]
                                                                                                  |) in
                                                                                                let~
                                                                                                      _ :=
                                                                                                  M.write (|
                                                                                                    M.SubPointer.get_struct_record_field (|
                                                                                                      header,
                                                                                                      "revm_primitives::bytecode::eof::header::EofHeader",
                                                                                                      "container_sizes"
                                                                                                    |),
                                                                                                    M.read (|
                                                                                                      sizes
                                                                                                    |)
                                                                                                  |) in
                                                                                                let~
                                                                                                      _ :=
                                                                                                  M.write (|
                                                                                                    M.SubPointer.get_struct_record_field (|
                                                                                                      header,
                                                                                                      "revm_primitives::bytecode::eof::header::EofHeader",
                                                                                                      "sum_container_sizes"
                                                                                                    |),
                                                                                                    M.read (|
                                                                                                      sum
                                                                                                    |)
                                                                                                  |) in
                                                                                                M.match_operator (|
                                                                                                  M.match_operator (|
                                                                                                    M.alloc (|
                                                                                                      M.call_closure (|
                                                                                                        M.get_trait_method (|
                                                                                                          "core::ops::try_trait::Try",
                                                                                                          Ty.apply
                                                                                                            (Ty.path
                                                                                                              "core::result::Result")
                                                                                                            []
                                                                                                            [
                                                                                                              Ty.tuple
                                                                                                                [
                                                                                                                  Ty.apply
                                                                                                                    (Ty.path
                                                                                                                      "&")
                                                                                                                    []
                                                                                                                    [
                                                                                                                      Ty.apply
                                                                                                                        (Ty.path
                                                                                                                          "slice")
                                                                                                                        []
                                                                                                                        [
                                                                                                                          Ty.path
                                                                                                                            "u8"
                                                                                                                        ]
                                                                                                                    ];
                                                                                                                  Ty.path
                                                                                                                    "u8"
                                                                                                                ];
                                                                                                              Ty.path
                                                                                                                "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                                            ],
                                                                                                          [],
                                                                                                          "branch",
                                                                                                          []
                                                                                                        |),
                                                                                                        [
                                                                                                          M.call_closure (|
                                                                                                            M.get_function (|
                                                                                                              "revm_primitives::bytecode::eof::decode_helpers::consume_u8",
                                                                                                              []
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                input
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                      |)
                                                                                                    |),
                                                                                                    [
                                                                                                      fun
                                                                                                          γ =>
                                                                                                        ltac:(M.monadic
                                                                                                          (let
                                                                                                                γ0_0 :=
                                                                                                            M.SubPointer.get_struct_tuple_field (|
                                                                                                              γ,
                                                                                                              "core::ops::control_flow::ControlFlow::Break",
                                                                                                              0
                                                                                                            |) in
                                                                                                          let
                                                                                                                residual :=
                                                                                                            M.copy (|
                                                                                                              γ0_0
                                                                                                            |) in
                                                                                                          M.alloc (|
                                                                                                            M.never_to_any (|
                                                                                                              M.read (|
                                                                                                                M.return_ (|
                                                                                                                  M.call_closure (|
                                                                                                                    M.get_trait_method (|
                                                                                                                      "core::ops::try_trait::FromResidual",
                                                                                                                      Ty.apply
                                                                                                                        (Ty.path
                                                                                                                          "core::result::Result")
                                                                                                                        []
                                                                                                                        [
                                                                                                                          Ty.tuple
                                                                                                                            [
                                                                                                                              Ty.path
                                                                                                                                "revm_primitives::bytecode::eof::header::EofHeader";
                                                                                                                              Ty.apply
                                                                                                                                (Ty.path
                                                                                                                                  "&")
                                                                                                                                []
                                                                                                                                [
                                                                                                                                  Ty.apply
                                                                                                                                    (Ty.path
                                                                                                                                      "slice")
                                                                                                                                    []
                                                                                                                                    [
                                                                                                                                      Ty.path
                                                                                                                                        "u8"
                                                                                                                                    ]
                                                                                                                                ]
                                                                                                                            ];
                                                                                                                          Ty.path
                                                                                                                            "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                                                        ],
                                                                                                                      [
                                                                                                                        Ty.apply
                                                                                                                          (Ty.path
                                                                                                                            "core::result::Result")
                                                                                                                          []
                                                                                                                          [
                                                                                                                            Ty.path
                                                                                                                              "core::convert::Infallible";
                                                                                                                            Ty.path
                                                                                                                              "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                                                          ]
                                                                                                                      ],
                                                                                                                      "from_residual",
                                                                                                                      []
                                                                                                                    |),
                                                                                                                    [
                                                                                                                      M.read (|
                                                                                                                        residual
                                                                                                                      |)
                                                                                                                    ]
                                                                                                                  |)
                                                                                                                |)
                                                                                                              |)
                                                                                                            |)
                                                                                                          |)));
                                                                                                      fun
                                                                                                          γ =>
                                                                                                        ltac:(M.monadic
                                                                                                          (let
                                                                                                                γ0_0 :=
                                                                                                            M.SubPointer.get_struct_tuple_field (|
                                                                                                              γ,
                                                                                                              "core::ops::control_flow::ControlFlow::Continue",
                                                                                                              0
                                                                                                            |) in
                                                                                                          let
                                                                                                                val :=
                                                                                                            M.copy (|
                                                                                                              γ0_0
                                                                                                            |) in
                                                                                                          val))
                                                                                                    ]
                                                                                                  |),
                                                                                                  [
                                                                                                    fun
                                                                                                        γ =>
                                                                                                      ltac:(M.monadic
                                                                                                        (let
                                                                                                              γ0_0 :=
                                                                                                          M.SubPointer.get_tuple_field (|
                                                                                                            γ,
                                                                                                            0
                                                                                                          |) in
                                                                                                        let
                                                                                                              γ0_1 :=
                                                                                                          M.SubPointer.get_tuple_field (|
                                                                                                            γ,
                                                                                                            1
                                                                                                          |) in
                                                                                                        let
                                                                                                              input :=
                                                                                                          M.copy (|
                                                                                                            γ0_0
                                                                                                          |) in
                                                                                                        let
                                                                                                              kind_data :=
                                                                                                          M.copy (|
                                                                                                            γ0_1
                                                                                                          |) in
                                                                                                        let~
                                                                                                              _ :=
                                                                                                          M.match_operator (|
                                                                                                            M.alloc (|
                                                                                                              Value.Tuple
                                                                                                                []
                                                                                                            |),
                                                                                                            [
                                                                                                              fun
                                                                                                                  γ =>
                                                                                                                ltac:(M.monadic
                                                                                                                  (let
                                                                                                                        γ :=
                                                                                                                    M.use
                                                                                                                      (M.alloc (|
                                                                                                                        BinOp.ne (|
                                                                                                                          M.read (|
                                                                                                                            kind_data
                                                                                                                          |),
                                                                                                                          M.read (|
                                                                                                                            M.get_constant (|
                                                                                                                              "revm_primitives::bytecode::eof::header::KIND_DATA"
                                                                                                                            |)
                                                                                                                          |)
                                                                                                                        |)
                                                                                                                      |)) in
                                                                                                                  let
                                                                                                                        _ :=
                                                                                                                    M.is_constant_or_break_match (|
                                                                                                                      M.read (|
                                                                                                                        γ
                                                                                                                      |),
                                                                                                                      Value.Bool
                                                                                                                        true
                                                                                                                    |) in
                                                                                                                  M.alloc (|
                                                                                                                    M.never_to_any (|
                                                                                                                      M.read (|
                                                                                                                        M.return_ (|
                                                                                                                          Value.StructTuple
                                                                                                                            "core::result::Result::Err"
                                                                                                                            [
                                                                                                                              Value.StructTuple
                                                                                                                                "revm_primitives::bytecode::eof::EofDecodeError::InvalidDataKind"
                                                                                                                                []
                                                                                                                            ]
                                                                                                                        |)
                                                                                                                      |)
                                                                                                                    |)
                                                                                                                  |)));
                                                                                                              fun
                                                                                                                  γ =>
                                                                                                                ltac:(M.monadic
                                                                                                                  (M.alloc (|
                                                                                                                    Value.Tuple
                                                                                                                      []
                                                                                                                  |)))
                                                                                                            ]
                                                                                                          |) in
                                                                                                        input))
                                                                                                  ]
                                                                                                |)))
                                                                                          ]
                                                                                        |)));
                                                                                    fun γ =>
                                                                                      ltac:(M.monadic
                                                                                        (let _ :=
                                                                                          M.is_constant_or_break_match (|
                                                                                            M.read (|
                                                                                              γ
                                                                                            |),
                                                                                            Value.Integer
                                                                                              IntegerKind.U8
                                                                                              4
                                                                                          |) in
                                                                                        M.alloc (|
                                                                                          M.read (|
                                                                                            input
                                                                                          |)
                                                                                        |)));
                                                                                    fun γ =>
                                                                                      ltac:(M.monadic
                                                                                        (M.alloc (|
                                                                                          M.never_to_any (|
                                                                                            M.read (|
                                                                                              M.return_ (|
                                                                                                Value.StructTuple
                                                                                                  "core::result::Result::Err"
                                                                                                  [
                                                                                                    Value.StructTuple
                                                                                                      "revm_primitives::bytecode::eof::EofDecodeError::InvalidKindAfterCode"
                                                                                                      []
                                                                                                  ]
                                                                                              |)
                                                                                            |)
                                                                                          |)
                                                                                        |)))
                                                                                  ]
                                                                                |)
                                                                              |) in
                                                                            M.match_operator (|
                                                                              M.match_operator (|
                                                                                M.alloc (|
                                                                                  M.call_closure (|
                                                                                    M.get_trait_method (|
                                                                                      "core::ops::try_trait::Try",
                                                                                      Ty.apply
                                                                                        (Ty.path
                                                                                          "core::result::Result")
                                                                                        []
                                                                                        [
                                                                                          Ty.tuple
                                                                                            [
                                                                                              Ty.apply
                                                                                                (Ty.path
                                                                                                  "&")
                                                                                                []
                                                                                                [
                                                                                                  Ty.apply
                                                                                                    (Ty.path
                                                                                                      "slice")
                                                                                                    []
                                                                                                    [
                                                                                                      Ty.path
                                                                                                        "u8"
                                                                                                    ]
                                                                                                ];
                                                                                              Ty.path
                                                                                                "u16"
                                                                                            ];
                                                                                          Ty.path
                                                                                            "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                        ],
                                                                                      [],
                                                                                      "branch",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      M.call_closure (|
                                                                                        M.get_function (|
                                                                                          "revm_primitives::bytecode::eof::decode_helpers::consume_u16",
                                                                                          []
                                                                                        |),
                                                                                        [
                                                                                          M.read (|
                                                                                            input
                                                                                          |)
                                                                                        ]
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                |),
                                                                                [
                                                                                  fun γ =>
                                                                                    ltac:(M.monadic
                                                                                      (let γ0_0 :=
                                                                                        M.SubPointer.get_struct_tuple_field (|
                                                                                          γ,
                                                                                          "core::ops::control_flow::ControlFlow::Break",
                                                                                          0
                                                                                        |) in
                                                                                      let
                                                                                            residual :=
                                                                                        M.copy (|
                                                                                          γ0_0
                                                                                        |) in
                                                                                      M.alloc (|
                                                                                        M.never_to_any (|
                                                                                          M.read (|
                                                                                            M.return_ (|
                                                                                              M.call_closure (|
                                                                                                M.get_trait_method (|
                                                                                                  "core::ops::try_trait::FromResidual",
                                                                                                  Ty.apply
                                                                                                    (Ty.path
                                                                                                      "core::result::Result")
                                                                                                    []
                                                                                                    [
                                                                                                      Ty.tuple
                                                                                                        [
                                                                                                          Ty.path
                                                                                                            "revm_primitives::bytecode::eof::header::EofHeader";
                                                                                                          Ty.apply
                                                                                                            (Ty.path
                                                                                                              "&")
                                                                                                            []
                                                                                                            [
                                                                                                              Ty.apply
                                                                                                                (Ty.path
                                                                                                                  "slice")
                                                                                                                []
                                                                                                                [
                                                                                                                  Ty.path
                                                                                                                    "u8"
                                                                                                                ]
                                                                                                            ]
                                                                                                        ];
                                                                                                      Ty.path
                                                                                                        "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                                    ],
                                                                                                  [
                                                                                                    Ty.apply
                                                                                                      (Ty.path
                                                                                                        "core::result::Result")
                                                                                                      []
                                                                                                      [
                                                                                                        Ty.path
                                                                                                          "core::convert::Infallible";
                                                                                                        Ty.path
                                                                                                          "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                                      ]
                                                                                                  ],
                                                                                                  "from_residual",
                                                                                                  []
                                                                                                |),
                                                                                                [
                                                                                                  M.read (|
                                                                                                    residual
                                                                                                  |)
                                                                                                ]
                                                                                              |)
                                                                                            |)
                                                                                          |)
                                                                                        |)
                                                                                      |)));
                                                                                  fun γ =>
                                                                                    ltac:(M.monadic
                                                                                      (let γ0_0 :=
                                                                                        M.SubPointer.get_struct_tuple_field (|
                                                                                          γ,
                                                                                          "core::ops::control_flow::ControlFlow::Continue",
                                                                                          0
                                                                                        |) in
                                                                                      let val :=
                                                                                        M.copy (|
                                                                                          γ0_0
                                                                                        |) in
                                                                                      val))
                                                                                ]
                                                                              |),
                                                                              [
                                                                                fun γ =>
                                                                                  ltac:(M.monadic
                                                                                    (let γ0_0 :=
                                                                                      M.SubPointer.get_tuple_field (|
                                                                                        γ,
                                                                                        0
                                                                                      |) in
                                                                                    let γ0_1 :=
                                                                                      M.SubPointer.get_tuple_field (|
                                                                                        γ,
                                                                                        1
                                                                                      |) in
                                                                                    let input :=
                                                                                      M.copy (|
                                                                                        γ0_0
                                                                                      |) in
                                                                                    let data_size :=
                                                                                      M.copy (|
                                                                                        γ0_1
                                                                                      |) in
                                                                                    let~ _ :=
                                                                                      M.write (|
                                                                                        M.SubPointer.get_struct_record_field (|
                                                                                          header,
                                                                                          "revm_primitives::bytecode::eof::header::EofHeader",
                                                                                          "data_size"
                                                                                        |),
                                                                                        M.read (|
                                                                                          data_size
                                                                                        |)
                                                                                      |) in
                                                                                    M.match_operator (|
                                                                                      M.match_operator (|
                                                                                        M.alloc (|
                                                                                          M.call_closure (|
                                                                                            M.get_trait_method (|
                                                                                              "core::ops::try_trait::Try",
                                                                                              Ty.apply
                                                                                                (Ty.path
                                                                                                  "core::result::Result")
                                                                                                []
                                                                                                [
                                                                                                  Ty.tuple
                                                                                                    [
                                                                                                      Ty.apply
                                                                                                        (Ty.path
                                                                                                          "&")
                                                                                                        []
                                                                                                        [
                                                                                                          Ty.apply
                                                                                                            (Ty.path
                                                                                                              "slice")
                                                                                                            []
                                                                                                            [
                                                                                                              Ty.path
                                                                                                                "u8"
                                                                                                            ]
                                                                                                        ];
                                                                                                      Ty.path
                                                                                                        "u8"
                                                                                                    ];
                                                                                                  Ty.path
                                                                                                    "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                                ],
                                                                                              [],
                                                                                              "branch",
                                                                                              []
                                                                                            |),
                                                                                            [
                                                                                              M.call_closure (|
                                                                                                M.get_function (|
                                                                                                  "revm_primitives::bytecode::eof::decode_helpers::consume_u8",
                                                                                                  []
                                                                                                |),
                                                                                                [
                                                                                                  M.read (|
                                                                                                    input
                                                                                                  |)
                                                                                                ]
                                                                                              |)
                                                                                            ]
                                                                                          |)
                                                                                        |),
                                                                                        [
                                                                                          fun γ =>
                                                                                            ltac:(M.monadic
                                                                                              (let
                                                                                                    γ0_0 :=
                                                                                                M.SubPointer.get_struct_tuple_field (|
                                                                                                  γ,
                                                                                                  "core::ops::control_flow::ControlFlow::Break",
                                                                                                  0
                                                                                                |) in
                                                                                              let
                                                                                                    residual :=
                                                                                                M.copy (|
                                                                                                  γ0_0
                                                                                                |) in
                                                                                              M.alloc (|
                                                                                                M.never_to_any (|
                                                                                                  M.read (|
                                                                                                    M.return_ (|
                                                                                                      M.call_closure (|
                                                                                                        M.get_trait_method (|
                                                                                                          "core::ops::try_trait::FromResidual",
                                                                                                          Ty.apply
                                                                                                            (Ty.path
                                                                                                              "core::result::Result")
                                                                                                            []
                                                                                                            [
                                                                                                              Ty.tuple
                                                                                                                [
                                                                                                                  Ty.path
                                                                                                                    "revm_primitives::bytecode::eof::header::EofHeader";
                                                                                                                  Ty.apply
                                                                                                                    (Ty.path
                                                                                                                      "&")
                                                                                                                    []
                                                                                                                    [
                                                                                                                      Ty.apply
                                                                                                                        (Ty.path
                                                                                                                          "slice")
                                                                                                                        []
                                                                                                                        [
                                                                                                                          Ty.path
                                                                                                                            "u8"
                                                                                                                        ]
                                                                                                                    ]
                                                                                                                ];
                                                                                                              Ty.path
                                                                                                                "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                                            ],
                                                                                                          [
                                                                                                            Ty.apply
                                                                                                              (Ty.path
                                                                                                                "core::result::Result")
                                                                                                              []
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "core::convert::Infallible";
                                                                                                                Ty.path
                                                                                                                  "revm_primitives::bytecode::eof::EofDecodeError"
                                                                                                              ]
                                                                                                          ],
                                                                                                          "from_residual",
                                                                                                          []
                                                                                                        |),
                                                                                                        [
                                                                                                          M.read (|
                                                                                                            residual
                                                                                                          |)
                                                                                                        ]
                                                                                                      |)
                                                                                                    |)
                                                                                                  |)
                                                                                                |)
                                                                                              |)));
                                                                                          fun γ =>
                                                                                            ltac:(M.monadic
                                                                                              (let
                                                                                                    γ0_0 :=
                                                                                                M.SubPointer.get_struct_tuple_field (|
                                                                                                  γ,
                                                                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                                                                  0
                                                                                                |) in
                                                                                              let
                                                                                                    val :=
                                                                                                M.copy (|
                                                                                                  γ0_0
                                                                                                |) in
                                                                                              val))
                                                                                        ]
                                                                                      |),
                                                                                      [
                                                                                        fun γ =>
                                                                                          ltac:(M.monadic
                                                                                            (let
                                                                                                  γ0_0 :=
                                                                                              M.SubPointer.get_tuple_field (|
                                                                                                γ,
                                                                                                0
                                                                                              |) in
                                                                                            let
                                                                                                  γ0_1 :=
                                                                                              M.SubPointer.get_tuple_field (|
                                                                                                γ,
                                                                                                1
                                                                                              |) in
                                                                                            let
                                                                                                  input :=
                                                                                              M.copy (|
                                                                                                γ0_0
                                                                                              |) in
                                                                                            let
                                                                                                  terminator :=
                                                                                              M.copy (|
                                                                                                γ0_1
                                                                                              |) in
                                                                                            let~
                                                                                                  _ :=
                                                                                              M.match_operator (|
                                                                                                M.alloc (|
                                                                                                  Value.Tuple
                                                                                                    []
                                                                                                |),
                                                                                                [
                                                                                                  fun
                                                                                                      γ =>
                                                                                                    ltac:(M.monadic
                                                                                                      (let
                                                                                                            γ :=
                                                                                                        M.use
                                                                                                          (M.alloc (|
                                                                                                            BinOp.ne (|
                                                                                                              M.read (|
                                                                                                                terminator
                                                                                                              |),
                                                                                                              M.read (|
                                                                                                                M.get_constant (|
                                                                                                                  "revm_primitives::bytecode::eof::header::KIND_TERMINAL"
                                                                                                                |)
                                                                                                              |)
                                                                                                            |)
                                                                                                          |)) in
                                                                                                      let
                                                                                                            _ :=
                                                                                                        M.is_constant_or_break_match (|
                                                                                                          M.read (|
                                                                                                            γ
                                                                                                          |),
                                                                                                          Value.Bool
                                                                                                            true
                                                                                                        |) in
                                                                                                      M.alloc (|
                                                                                                        M.never_to_any (|
                                                                                                          M.read (|
                                                                                                            M.return_ (|
                                                                                                              Value.StructTuple
                                                                                                                "core::result::Result::Err"
                                                                                                                [
                                                                                                                  Value.StructTuple
                                                                                                                    "revm_primitives::bytecode::eof::EofDecodeError::InvalidTerminalByte"
                                                                                                                    []
                                                                                                                ]
                                                                                                            |)
                                                                                                          |)
                                                                                                        |)
                                                                                                      |)));
                                                                                                  fun
                                                                                                      γ =>
                                                                                                    ltac:(M.monadic
                                                                                                      (M.alloc (|
                                                                                                        Value.Tuple
                                                                                                          []
                                                                                                      |)))
                                                                                                ]
                                                                                              |) in
                                                                                            M.alloc (|
                                                                                              Value.StructTuple
                                                                                                "core::result::Result::Ok"
                                                                                                [
                                                                                                  Value.Tuple
                                                                                                    [
                                                                                                      M.read (|
                                                                                                        header
                                                                                                      |);
                                                                                                      M.read (|
                                                                                                        input
                                                                                                      |)
                                                                                                    ]
                                                                                                ]
                                                                                            |)))
                                                                                      ]
                                                                                    |)))
                                                                              ]
                                                                            |)))
                                                                      ]
                                                                    |)))
                                                              ]
                                                            |)))
                                                      ]
                                                    |)))
                                              ]
                                            |)))
                                      ]
                                    |)))
                              ]
                            |)))
                      ]
                    |)
                  |)))
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_decode : M.IsAssociatedFunction Self "decode" decode.
      End Impl_revm_primitives_bytecode_eof_header_EofHeader.
    End header.
  End eof.
End bytecode.
