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

Module opcode.
  Module eof_printer.
    (*
    pub fn print_eof_code(code: &[u8]) {
        use super::*;
        use crate::instructions::utility::read_i16;
        use revm_primitives::hex;
    
        // We can check validity and jump destinations in one pass.
        let mut i = 0;
        while i < code.len() {
            let op = code[i];
            let opcode = &OPCODE_INFO_JUMPTABLE[op as usize];
    
            let Some(opcode) = opcode else {
                println!("Unknown opcode: 0x{:02X}", op);
                i += 1;
                continue;
            };
    
            if opcode.immediate_size() != 0 {
                // check if the opcode immediate are within the bounds of the code
                if i + opcode.immediate_size() as usize >= code.len() {
                    println!("Malformed code: immediate out of bounds");
                    break;
                }
            }
    
            print!("{}", opcode.name());
            if opcode.immediate_size() != 0 {
                print!(
                    " : 0x{:}",
                    hex::encode(&code[i + 1..i + 1 + opcode.immediate_size() as usize])
                );
            }
    
            let mut rjumpv_additional_immediates = 0;
            if op == RJUMPV {
                let max_index = code[i + 1] as usize;
                let len = max_index + 1;
                // and max_index+1 is to get size of vtable as index starts from 0.
                rjumpv_additional_immediates = len * 2;
    
                // +1 is for max_index byte
                if i + 1 + rjumpv_additional_immediates >= code.len() {
                    println!("Malformed code: immediate out of bounds");
                    break;
                }
    
                for vtablei in 0..len {
                    let offset = unsafe { read_i16(code.as_ptr().add(i + 2 + 2 * vtablei)) } as isize;
                    println!("RJUMPV[{vtablei}]: 0x{offset:04X}({offset})");
                }
            }
    
            i += 1 + opcode.immediate_size() as usize + rjumpv_additional_immediates;
        }
    }
    *)
    Definition print_eof_code (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ code ] =>
        ltac:(M.monadic
          (let code := M.alloc (| code |) in
          M.read (|
            let~ i := M.alloc (| Value.Integer IntegerKind.Usize 0 |) in
            M.loop (|
              ltac:(M.monadic
                (M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ :=
                          M.use
                            (M.alloc (|
                              BinOp.lt (|
                                M.read (| i |),
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ],
                                    "len",
                                    []
                                  |),
                                  [ M.read (| code |) ]
                                |)
                              |)
                            |)) in
                        let _ :=
                          M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                        let~ op :=
                          M.copy (| M.SubPointer.get_array_field (| M.read (| code |), i |) |) in
                        let~ opcode :=
                          M.alloc (|
                            M.SubPointer.get_array_field (|
                              M.get_constant (|
                                "revm_interpreter::opcode::OPCODE_INFO_JUMPTABLE"
                              |),
                              M.alloc (| M.rust_cast (M.read (| op |)) |)
                            |)
                          |) in
                        M.match_operator (|
                          opcode,
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let γ := M.read (| γ |) in
                                let γ1_0 :=
                                  M.SubPointer.get_struct_tuple_field (|
                                    γ,
                                    "core::option::Option::Some",
                                    0
                                  |) in
                                let opcode := M.alloc (| γ1_0 |) 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.path
                                                        "revm_interpreter::opcode::OpCodeInfo",
                                                      "immediate_size",
                                                      []
                                                    |),
                                                    [ M.read (| opcode |) ]
                                                  |),
                                                  Value.Integer IntegerKind.U8 0
                                                |)
                                              |)) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.Bool true
                                            |) in
                                          M.match_operator (|
                                            M.alloc (| Value.Tuple [] |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ :=
                                                    M.use
                                                      (M.alloc (|
                                                        BinOp.ge (|
                                                          BinOp.Wrap.add (|
                                                            M.read (| i |),
                                                            M.rust_cast
                                                              (M.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path
                                                                    "revm_interpreter::opcode::OpCodeInfo",
                                                                  "immediate_size",
                                                                  []
                                                                |),
                                                                [ M.read (| opcode |) ]
                                                              |))
                                                          |),
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.apply
                                                                (Ty.path "slice")
                                                                []
                                                                [ Ty.path "u8" ],
                                                              "len",
                                                              []
                                                            |),
                                                            [ M.read (| code |) ]
                                                          |)
                                                        |)
                                                      |)) in
                                                  let _ :=
                                                    M.is_constant_or_break_match (|
                                                      M.read (| γ |),
                                                      Value.Bool true
                                                    |) in
                                                  M.alloc (|
                                                    M.never_to_any (|
                                                      M.read (|
                                                        let~ _ :=
                                                          let~ _ :=
                                                            M.alloc (|
                                                              M.call_closure (|
                                                                M.get_function (|
                                                                  "std::io::stdio::_print",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "core::fmt::Arguments",
                                                                      "new_const",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.alloc (|
                                                                        Value.Array
                                                                          [
                                                                            M.read (|
                                                                              Value.String
                                                                                "Malformed code: immediate out of bounds
"
                                                                            |)
                                                                          ]
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |) in
                                                          M.alloc (| Value.Tuple [] |) in
                                                        M.break (||)
                                                      |)
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                            ]
                                          |)));
                                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |) in
                                let~ _ :=
                                  let~ _ :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_function (| "std::io::stdio::_print", [] |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "core::fmt::Arguments",
                                              "new_v1",
                                              []
                                            |),
                                            [
                                              M.alloc (|
                                                Value.Array [ M.read (| Value.String "" |) ]
                                              |);
                                              M.alloc (|
                                                Value.Array
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path "core::fmt::rt::Argument",
                                                        "new_display",
                                                        [
                                                          Ty.apply
                                                            (Ty.path "&")
                                                            []
                                                            [ Ty.path "str" ]
                                                        ]
                                                      |),
                                                      [
                                                        M.alloc (|
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.path
                                                                "revm_interpreter::opcode::OpCodeInfo",
                                                              "name",
                                                              []
                                                            |),
                                                            [ M.read (| opcode |) ]
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  ]
                                              |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    |) in
                                  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.path
                                                        "revm_interpreter::opcode::OpCodeInfo",
                                                      "immediate_size",
                                                      []
                                                    |),
                                                    [ M.read (| opcode |) ]
                                                  |),
                                                  Value.Integer IntegerKind.U8 0
                                                |)
                                              |)) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.Bool true
                                            |) in
                                          let~ _ :=
                                            let~ _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_function (| "std::io::stdio::_print", [] |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path "core::fmt::Arguments",
                                                        "new_v1",
                                                        []
                                                      |),
                                                      [
                                                        M.alloc (|
                                                          Value.Array
                                                            [ M.read (| Value.String " : 0x" |) ]
                                                        |);
                                                        M.alloc (|
                                                          Value.Array
                                                            [
                                                              M.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path "core::fmt::rt::Argument",
                                                                  "new_display",
                                                                  [ Ty.path "alloc::string::String"
                                                                  ]
                                                                |),
                                                                [
                                                                  M.alloc (|
                                                                    M.call_closure (|
                                                                      M.get_function (|
                                                                        "const_hex::encode",
                                                                        [
                                                                          Ty.apply
                                                                            (Ty.path "&")
                                                                            []
                                                                            [
                                                                              Ty.apply
                                                                                (Ty.path "slice")
                                                                                []
                                                                                [ Ty.path "u8" ]
                                                                            ]
                                                                        ]
                                                                      |),
                                                                      [
                                                                        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::Range")
                                                                                []
                                                                                [ Ty.path "usize" ]
                                                                            ],
                                                                            "index",
                                                                            []
                                                                          |),
                                                                          [
                                                                            M.read (| code |);
                                                                            Value.StructRecord
                                                                              "core::ops::range::Range"
                                                                              [
                                                                                ("start",
                                                                                  BinOp.Wrap.add (|
                                                                                    M.read (| i |),
                                                                                    Value.Integer
                                                                                      IntegerKind.Usize
                                                                                      1
                                                                                  |));
                                                                                ("end_",
                                                                                  BinOp.Wrap.add (|
                                                                                    BinOp.Wrap.add (|
                                                                                      M.read (|
                                                                                        i
                                                                                      |),
                                                                                      Value.Integer
                                                                                        IntegerKind.Usize
                                                                                        1
                                                                                    |),
                                                                                    M.rust_cast
                                                                                      (M.call_closure (|
                                                                                        M.get_associated_function (|
                                                                                          Ty.path
                                                                                            "revm_interpreter::opcode::OpCodeInfo",
                                                                                          "immediate_size",
                                                                                          []
                                                                                        |),
                                                                                        [
                                                                                          M.read (|
                                                                                            opcode
                                                                                          |)
                                                                                        ]
                                                                                      |))
                                                                                  |))
                                                                              ]
                                                                          ]
                                                                        |)
                                                                      ]
                                                                    |)
                                                                  |)
                                                                ]
                                                              |)
                                                            ]
                                                        |)
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |) in
                                          M.alloc (| Value.Tuple [] |)));
                                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |) in
                                let~ rjumpv_additional_immediates :=
                                  M.alloc (| Value.Integer IntegerKind.Usize 0 |) in
                                let~ _ :=
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.use
                                              (M.alloc (|
                                                BinOp.eq (|
                                                  M.read (| op |),
                                                  M.read (|
                                                    M.get_constant (|
                                                      "revm_interpreter::opcode::RJUMPV"
                                                    |)
                                                  |)
                                                |)
                                              |)) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.Bool true
                                            |) in
                                          let~ max_index :=
                                            M.alloc (|
                                              M.rust_cast
                                                (M.read (|
                                                  M.SubPointer.get_array_field (|
                                                    M.read (| code |),
                                                    M.alloc (|
                                                      BinOp.Wrap.add (|
                                                        M.read (| i |),
                                                        Value.Integer IntegerKind.Usize 1
                                                      |)
                                                    |)
                                                  |)
                                                |))
                                            |) in
                                          let~ len :=
                                            M.alloc (|
                                              BinOp.Wrap.add (|
                                                M.read (| max_index |),
                                                Value.Integer IntegerKind.Usize 1
                                              |)
                                            |) in
                                          let~ _ :=
                                            M.write (|
                                              rjumpv_additional_immediates,
                                              BinOp.Wrap.mul (|
                                                M.read (| len |),
                                                Value.Integer IntegerKind.Usize 2
                                              |)
                                            |) in
                                          let~ _ :=
                                            M.match_operator (|
                                              M.alloc (| Value.Tuple [] |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ :=
                                                      M.use
                                                        (M.alloc (|
                                                          BinOp.ge (|
                                                            BinOp.Wrap.add (|
                                                              BinOp.Wrap.add (|
                                                                M.read (| i |),
                                                                Value.Integer IntegerKind.Usize 1
                                                              |),
                                                              M.read (|
                                                                rjumpv_additional_immediates
                                                              |)
                                                            |),
                                                            M.call_closure (|
                                                              M.get_associated_function (|
                                                                Ty.apply
                                                                  (Ty.path "slice")
                                                                  []
                                                                  [ Ty.path "u8" ],
                                                                "len",
                                                                []
                                                              |),
                                                              [ M.read (| code |) ]
                                                            |)
                                                          |)
                                                        |)) in
                                                    let _ :=
                                                      M.is_constant_or_break_match (|
                                                        M.read (| γ |),
                                                        Value.Bool true
                                                      |) in
                                                    M.alloc (|
                                                      M.never_to_any (|
                                                        M.read (|
                                                          let~ _ :=
                                                            let~ _ :=
                                                              M.alloc (|
                                                                M.call_closure (|
                                                                  M.get_function (|
                                                                    "std::io::stdio::_print",
                                                                    []
                                                                  |),
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_associated_function (|
                                                                        Ty.path
                                                                          "core::fmt::Arguments",
                                                                        "new_const",
                                                                        []
                                                                      |),
                                                                      [
                                                                        M.alloc (|
                                                                          Value.Array
                                                                            [
                                                                              M.read (|
                                                                                Value.String
                                                                                  "Malformed code: immediate out of bounds
"
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      ]
                                                                    |)
                                                                  ]
                                                                |)
                                                              |) in
                                                            M.alloc (| Value.Tuple [] |) in
                                                          M.break (||)
                                                        |)
                                                      |)
                                                    |)));
                                                fun γ =>
                                                  ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                              ]
                                            |) in
                                          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.read (| len |))
                                                      ]
                                                  ]
                                                |)
                                              |),
                                              [
                                                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 vtablei :=
                                                                    M.copy (| γ0_0 |) in
                                                                  let~ offset :=
                                                                    M.alloc (|
                                                                      M.rust_cast
                                                                        (M.call_closure (|
                                                                          M.get_function (|
                                                                            "revm_interpreter::instructions::utility::read_i16",
                                                                            []
                                                                          |),
                                                                          [
                                                                            M.call_closure (|
                                                                              M.get_associated_function (|
                                                                                Ty.apply
                                                                                  (Ty.path "*const")
                                                                                  []
                                                                                  [ Ty.path "u8" ],
                                                                                "add",
                                                                                []
                                                                              |),
                                                                              [
                                                                                M.call_closure (|
                                                                                  M.get_associated_function (|
                                                                                    Ty.apply
                                                                                      (Ty.path
                                                                                        "slice")
                                                                                      []
                                                                                      [ Ty.path "u8"
                                                                                      ],
                                                                                    "as_ptr",
                                                                                    []
                                                                                  |),
                                                                                  [
                                                                                    M.read (|
                                                                                      code
                                                                                    |)
                                                                                  ]
                                                                                |);
                                                                                BinOp.Wrap.add (|
                                                                                  BinOp.Wrap.add (|
                                                                                    M.read (| i |),
                                                                                    Value.Integer
                                                                                      IntegerKind.Usize
                                                                                      2
                                                                                  |),
                                                                                  BinOp.Wrap.mul (|
                                                                                    Value.Integer
                                                                                      IntegerKind.Usize
                                                                                      2,
                                                                                    M.read (|
                                                                                      vtablei
                                                                                    |)
                                                                                  |)
                                                                                |)
                                                                              ]
                                                                            |)
                                                                          ]
                                                                        |))
                                                                    |) in
                                                                  let~ _ :=
                                                                    let~ _ :=
                                                                      M.alloc (|
                                                                        M.call_closure (|
                                                                          M.get_function (|
                                                                            "std::io::stdio::_print",
                                                                            []
                                                                          |),
                                                                          [
                                                                            M.call_closure (|
                                                                              M.get_associated_function (|
                                                                                Ty.path
                                                                                  "core::fmt::Arguments",
                                                                                "new_v1_formatted",
                                                                                []
                                                                              |),
                                                                              [
                                                                                M.alloc (|
                                                                                  Value.Array
                                                                                    [
                                                                                      M.read (|
                                                                                        Value.String
                                                                                          "RJUMPV["
                                                                                      |);
                                                                                      M.read (|
                                                                                        Value.String
                                                                                          "]: 0x"
                                                                                      |);
                                                                                      M.read (|
                                                                                        Value.String
                                                                                          "("
                                                                                      |);
                                                                                      M.read (|
                                                                                        Value.String
                                                                                          ")
"
                                                                                      |)
                                                                                    ]
                                                                                |);
                                                                                M.match_operator (|
                                                                                  M.alloc (|
                                                                                    Value.Tuple
                                                                                      [
                                                                                        vtablei;
                                                                                        offset
                                                                                      ]
                                                                                  |),
                                                                                  [
                                                                                    fun γ =>
                                                                                      ltac:(M.monadic
                                                                                        (let args :=
                                                                                          M.copy (|
                                                                                            γ
                                                                                          |) in
                                                                                        M.alloc (|
                                                                                          Value.Array
                                                                                            [
                                                                                              M.call_closure (|
                                                                                                M.get_associated_function (|
                                                                                                  Ty.path
                                                                                                    "core::fmt::rt::Argument",
                                                                                                  "new_display",
                                                                                                  [
                                                                                                    Ty.path
                                                                                                      "usize"
                                                                                                  ]
                                                                                                |),
                                                                                                [
                                                                                                  M.read (|
                                                                                                    M.SubPointer.get_tuple_field (|
                                                                                                      args,
                                                                                                      0
                                                                                                    |)
                                                                                                  |)
                                                                                                ]
                                                                                              |);
                                                                                              M.call_closure (|
                                                                                                M.get_associated_function (|
                                                                                                  Ty.path
                                                                                                    "core::fmt::rt::Argument",
                                                                                                  "new_upper_hex",
                                                                                                  [
                                                                                                    Ty.path
                                                                                                      "isize"
                                                                                                  ]
                                                                                                |),
                                                                                                [
                                                                                                  M.read (|
                                                                                                    M.SubPointer.get_tuple_field (|
                                                                                                      args,
                                                                                                      1
                                                                                                    |)
                                                                                                  |)
                                                                                                ]
                                                                                              |);
                                                                                              M.call_closure (|
                                                                                                M.get_associated_function (|
                                                                                                  Ty.path
                                                                                                    "core::fmt::rt::Argument",
                                                                                                  "new_display",
                                                                                                  [
                                                                                                    Ty.path
                                                                                                      "isize"
                                                                                                  ]
                                                                                                |),
                                                                                                [
                                                                                                  M.read (|
                                                                                                    M.SubPointer.get_tuple_field (|
                                                                                                      args,
                                                                                                      1
                                                                                                    |)
                                                                                                  |)
                                                                                                ]
                                                                                              |)
                                                                                            ]
                                                                                        |)))
                                                                                  ]
                                                                                |);
                                                                                M.alloc (|
                                                                                  Value.Array
                                                                                    [
                                                                                      M.call_closure (|
                                                                                        M.get_associated_function (|
                                                                                          Ty.path
                                                                                            "core::fmt::rt::Placeholder",
                                                                                          "new",
                                                                                          []
                                                                                        |),
                                                                                        [
                                                                                          Value.Integer
                                                                                            IntegerKind.Usize
                                                                                            0;
                                                                                          Value.UnicodeChar
                                                                                            32;
                                                                                          Value.StructTuple
                                                                                            "core::fmt::rt::Alignment::Unknown"
                                                                                            [];
                                                                                          Value.Integer
                                                                                            IntegerKind.U32
                                                                                            0;
                                                                                          Value.StructTuple
                                                                                            "core::fmt::rt::Count::Implied"
                                                                                            [];
                                                                                          Value.StructTuple
                                                                                            "core::fmt::rt::Count::Implied"
                                                                                            []
                                                                                        ]
                                                                                      |);
                                                                                      M.call_closure (|
                                                                                        M.get_associated_function (|
                                                                                          Ty.path
                                                                                            "core::fmt::rt::Placeholder",
                                                                                          "new",
                                                                                          []
                                                                                        |),
                                                                                        [
                                                                                          Value.Integer
                                                                                            IntegerKind.Usize
                                                                                            1;
                                                                                          Value.UnicodeChar
                                                                                            32;
                                                                                          Value.StructTuple
                                                                                            "core::fmt::rt::Alignment::Unknown"
                                                                                            [];
                                                                                          Value.Integer
                                                                                            IntegerKind.U32
                                                                                            8;
                                                                                          Value.StructTuple
                                                                                            "core::fmt::rt::Count::Implied"
                                                                                            [];
                                                                                          Value.StructTuple
                                                                                            "core::fmt::rt::Count::Is"
                                                                                            [
                                                                                              Value.Integer
                                                                                                IntegerKind.Usize
                                                                                                4
                                                                                            ]
                                                                                        ]
                                                                                      |);
                                                                                      M.call_closure (|
                                                                                        M.get_associated_function (|
                                                                                          Ty.path
                                                                                            "core::fmt::rt::Placeholder",
                                                                                          "new",
                                                                                          []
                                                                                        |),
                                                                                        [
                                                                                          Value.Integer
                                                                                            IntegerKind.Usize
                                                                                            2;
                                                                                          Value.UnicodeChar
                                                                                            32;
                                                                                          Value.StructTuple
                                                                                            "core::fmt::rt::Alignment::Unknown"
                                                                                            [];
                                                                                          Value.Integer
                                                                                            IntegerKind.U32
                                                                                            0;
                                                                                          Value.StructTuple
                                                                                            "core::fmt::rt::Count::Implied"
                                                                                            [];
                                                                                          Value.StructTuple
                                                                                            "core::fmt::rt::Count::Implied"
                                                                                            []
                                                                                        ]
                                                                                      |)
                                                                                    ]
                                                                                |);
                                                                                M.call_closure (|
                                                                                  M.get_associated_function (|
                                                                                    Ty.path
                                                                                      "core::fmt::rt::UnsafeArg",
                                                                                    "new",
                                                                                    []
                                                                                  |),
                                                                                  []
                                                                                |)
                                                                              ]
                                                                            |)
                                                                          ]
                                                                        |)
                                                                      |) in
                                                                    M.alloc (| Value.Tuple [] |) in
                                                                  M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)))
                                                    |)))
                                              ]
                                            |))));
                                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |) in
                                let~ _ :=
                                  let β := i in
                                  M.write (|
                                    β,
                                    BinOp.Wrap.add (|
                                      M.read (| β |),
                                      BinOp.Wrap.add (|
                                        BinOp.Wrap.add (|
                                          Value.Integer IntegerKind.Usize 1,
                                          M.rust_cast
                                            (M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path "revm_interpreter::opcode::OpCodeInfo",
                                                "immediate_size",
                                                []
                                              |),
                                              [ M.read (| opcode |) ]
                                            |))
                                        |),
                                        M.read (| rjumpv_additional_immediates |)
                                      |)
                                    |)
                                  |) in
                                M.alloc (| Value.Tuple [] |)))
                          ]
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (M.alloc (|
                          M.never_to_any (|
                            M.read (|
                              let~ _ :=
                                M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in
                              M.alloc (| Value.Tuple [] |)
                            |)
                          |)
                        |)))
                  ]
                |)))
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Function_print_eof_code :
      M.IsFunction "revm_interpreter::opcode::eof_printer::print_eof_code" print_eof_code.
  End eof_printer.
End opcode.
