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

Module journaled_state.
  (* StructRecord
    {
      name := "JournaledState";
      const_params := [];
      ty_params := [];
      fields :=
        [
          ("state",
            Ty.apply
              (Ty.path "std::collections::hash::map::HashMap")
              []
              [
                Ty.path "alloy_primitives::bits::address::Address";
                Ty.path "revm_primitives::state::Account";
                Ty.path "std::hash::random::RandomState"
              ]);
          ("transient_storage",
            Ty.apply
              (Ty.path "std::collections::hash::map::HashMap")
              []
              [
                Ty.tuple
                  [
                    Ty.path "alloy_primitives::bits::address::Address";
                    Ty.apply
                      (Ty.path "ruint::Uint")
                      [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                      []
                  ];
                Ty.apply
                  (Ty.path "ruint::Uint")
                  [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                  [];
                Ty.path "std::hash::random::RandomState"
              ]);
          ("logs",
            Ty.apply
              (Ty.path "alloc::vec::Vec")
              []
              [
                Ty.apply
                  (Ty.path "alloy_primitives::log::Log")
                  []
                  [ Ty.path "alloy_primitives::log::LogData" ];
                Ty.path "alloc::alloc::Global"
              ]);
          ("depth", Ty.path "usize");
          ("journal",
            Ty.apply
              (Ty.path "alloc::vec::Vec")
              []
              [
                Ty.apply
                  (Ty.path "alloc::vec::Vec")
                  []
                  [ Ty.path "revm::journaled_state::JournalEntry"; Ty.path "alloc::alloc::Global" ];
                Ty.path "alloc::alloc::Global"
              ]);
          ("spec", Ty.path "revm_primitives::specification::SpecId");
          ("warm_preloaded_addresses",
            Ty.apply
              (Ty.path "std::collections::hash::set::HashSet")
              []
              [
                Ty.path "alloy_primitives::bits::address::Address";
                Ty.path "std::hash::random::RandomState"
              ])
        ];
    } *)
  
  Module Impl_core_fmt_Debug_for_revm_journaled_state_JournaledState.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournaledState".
    
    (* 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 "state" |);
                      M.read (| Value.String "transient_storage" |);
                      M.read (| Value.String "logs" |);
                      M.read (| Value.String "depth" |);
                      M.read (| Value.String "journal" |);
                      M.read (| Value.String "spec" |);
                      M.read (| Value.String "warm_preloaded_addresses" |)
                    ]
                |)
              |) in
            let~ values :=
              M.alloc (|
                M.alloc (|
                  Value.Array
                    [
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "revm::journaled_state::JournaledState",
                        "state"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "revm::journaled_state::JournaledState",
                        "transient_storage"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "revm::journaled_state::JournaledState",
                        "logs"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "revm::journaled_state::JournaledState",
                        "depth"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "revm::journaled_state::JournaledState",
                        "journal"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "revm::journaled_state::JournaledState",
                        "spec"
                      |);
                      M.alloc (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm::journaled_state::JournaledState",
                          "warm_preloaded_addresses"
                        |)
                      |)
                    ]
                |)
              |) 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 "JournaledState" |);
                  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_journaled_state_JournaledState.
  
  Module Impl_core_clone_Clone_for_revm_journaled_state_JournaledState.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournaledState".
    
    (* 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::journaled_state::JournaledState"
            [
              ("state",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::clone::Clone",
                    Ty.apply
                      (Ty.path "std::collections::hash::map::HashMap")
                      []
                      [
                        Ty.path "alloy_primitives::bits::address::Address";
                        Ty.path "revm_primitives::state::Account";
                        Ty.path "std::hash::random::RandomState"
                      ],
                    [],
                    "clone",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "state"
                    |)
                  ]
                |));
              ("transient_storage",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::clone::Clone",
                    Ty.apply
                      (Ty.path "std::collections::hash::map::HashMap")
                      []
                      [
                        Ty.tuple
                          [
                            Ty.path "alloy_primitives::bits::address::Address";
                            Ty.apply
                              (Ty.path "ruint::Uint")
                              [
                                Value.Integer IntegerKind.Usize 256;
                                Value.Integer IntegerKind.Usize 4
                              ]
                              []
                          ];
                        Ty.apply
                          (Ty.path "ruint::Uint")
                          [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                          [];
                        Ty.path "std::hash::random::RandomState"
                      ],
                    [],
                    "clone",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "transient_storage"
                    |)
                  ]
                |));
              ("logs",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::clone::Clone",
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [
                        Ty.apply
                          (Ty.path "alloy_primitives::log::Log")
                          []
                          [ Ty.path "alloy_primitives::log::LogData" ];
                        Ty.path "alloc::alloc::Global"
                      ],
                    [],
                    "clone",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "logs"
                    |)
                  ]
                |));
              ("depth",
                M.call_closure (|
                  M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "depth"
                    |)
                  ]
                |));
              ("journal",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::clone::Clone",
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [
                            Ty.path "revm::journaled_state::JournalEntry";
                            Ty.path "alloc::alloc::Global"
                          ];
                        Ty.path "alloc::alloc::Global"
                      ],
                    [],
                    "clone",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "journal"
                    |)
                  ]
                |));
              ("spec",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::clone::Clone",
                    Ty.path "revm_primitives::specification::SpecId",
                    [],
                    "clone",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "spec"
                    |)
                  ]
                |));
              ("warm_preloaded_addresses",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::clone::Clone",
                    Ty.apply
                      (Ty.path "std::collections::hash::set::HashSet")
                      []
                      [
                        Ty.path "alloy_primitives::bits::address::Address";
                        Ty.path "std::hash::random::RandomState"
                      ],
                    [],
                    "clone",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "warm_preloaded_addresses"
                    |)
                  ]
                |))
            ]))
      | _, _, _ => 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_journaled_state_JournaledState.
  
  Module Impl_core_marker_StructuralPartialEq_for_revm_journaled_state_JournaledState.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournaledState".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_revm_journaled_state_JournaledState.
  
  Module Impl_core_cmp_PartialEq_for_revm_journaled_state_JournaledState.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournaledState".
    
    (* 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 (|
                    LogicalOp.and (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::cmp::PartialEq",
                          Ty.apply
                            (Ty.path "std::collections::hash::map::HashMap")
                            []
                            [
                              Ty.path "alloy_primitives::bits::address::Address";
                              Ty.path "revm_primitives::state::Account";
                              Ty.path "std::hash::random::RandomState"
                            ],
                          [
                            Ty.apply
                              (Ty.path "std::collections::hash::map::HashMap")
                              []
                              [
                                Ty.path "alloy_primitives::bits::address::Address";
                                Ty.path "revm_primitives::state::Account";
                                Ty.path "std::hash::random::RandomState"
                              ]
                          ],
                          "eq",
                          []
                        |),
                        [
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "revm::journaled_state::JournaledState",
                            "state"
                          |);
                          M.SubPointer.get_struct_record_field (|
                            M.read (| other |),
                            "revm::journaled_state::JournaledState",
                            "state"
                          |)
                        ]
                      |),
                      ltac:(M.monadic
                        (M.call_closure (|
                          M.get_trait_method (|
                            "core::cmp::PartialEq",
                            Ty.apply
                              (Ty.path "std::collections::hash::map::HashMap")
                              []
                              [
                                Ty.tuple
                                  [
                                    Ty.path "alloy_primitives::bits::address::Address";
                                    Ty.apply
                                      (Ty.path "ruint::Uint")
                                      [
                                        Value.Integer IntegerKind.Usize 256;
                                        Value.Integer IntegerKind.Usize 4
                                      ]
                                      []
                                  ];
                                Ty.apply
                                  (Ty.path "ruint::Uint")
                                  [
                                    Value.Integer IntegerKind.Usize 256;
                                    Value.Integer IntegerKind.Usize 4
                                  ]
                                  [];
                                Ty.path "std::hash::random::RandomState"
                              ],
                            [
                              Ty.apply
                                (Ty.path "std::collections::hash::map::HashMap")
                                []
                                [
                                  Ty.tuple
                                    [
                                      Ty.path "alloy_primitives::bits::address::Address";
                                      Ty.apply
                                        (Ty.path "ruint::Uint")
                                        [
                                          Value.Integer IntegerKind.Usize 256;
                                          Value.Integer IntegerKind.Usize 4
                                        ]
                                        []
                                    ];
                                  Ty.apply
                                    (Ty.path "ruint::Uint")
                                    [
                                      Value.Integer IntegerKind.Usize 256;
                                      Value.Integer IntegerKind.Usize 4
                                    ]
                                    [];
                                  Ty.path "std::hash::random::RandomState"
                                ]
                            ],
                            "eq",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm::journaled_state::JournaledState",
                              "transient_storage"
                            |);
                            M.SubPointer.get_struct_record_field (|
                              M.read (| other |),
                              "revm::journaled_state::JournaledState",
                              "transient_storage"
                            |)
                          ]
                        |)))
                    |),
                    ltac:(M.monadic
                      (M.call_closure (|
                        M.get_trait_method (|
                          "core::cmp::PartialEq",
                          Ty.apply
                            (Ty.path "alloc::vec::Vec")
                            []
                            [
                              Ty.apply
                                (Ty.path "alloy_primitives::log::Log")
                                []
                                [ Ty.path "alloy_primitives::log::LogData" ];
                              Ty.path "alloc::alloc::Global"
                            ],
                          [
                            Ty.apply
                              (Ty.path "alloc::vec::Vec")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloy_primitives::log::Log")
                                  []
                                  [ Ty.path "alloy_primitives::log::LogData" ];
                                Ty.path "alloc::alloc::Global"
                              ]
                          ],
                          "eq",
                          []
                        |),
                        [
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "revm::journaled_state::JournaledState",
                            "logs"
                          |);
                          M.SubPointer.get_struct_record_field (|
                            M.read (| other |),
                            "revm::journaled_state::JournaledState",
                            "logs"
                          |)
                        ]
                      |)))
                  |),
                  ltac:(M.monadic
                    (BinOp.eq (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm::journaled_state::JournaledState",
                          "depth"
                        |)
                      |),
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| other |),
                          "revm::journaled_state::JournaledState",
                          "depth"
                        |)
                      |)
                    |)))
                |),
                ltac:(M.monadic
                  (M.call_closure (|
                    M.get_trait_method (|
                      "core::cmp::PartialEq",
                      Ty.apply
                        (Ty.path "alloc::vec::Vec")
                        []
                        [
                          Ty.apply
                            (Ty.path "alloc::vec::Vec")
                            []
                            [
                              Ty.path "revm::journaled_state::JournalEntry";
                              Ty.path "alloc::alloc::Global"
                            ];
                          Ty.path "alloc::alloc::Global"
                        ],
                      [
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [
                            Ty.apply
                              (Ty.path "alloc::vec::Vec")
                              []
                              [
                                Ty.path "revm::journaled_state::JournalEntry";
                                Ty.path "alloc::alloc::Global"
                              ];
                            Ty.path "alloc::alloc::Global"
                          ]
                      ],
                      "eq",
                      []
                    |),
                    [
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "revm::journaled_state::JournaledState",
                        "journal"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| other |),
                        "revm::journaled_state::JournaledState",
                        "journal"
                      |)
                    ]
                  |)))
              |),
              ltac:(M.monadic
                (M.call_closure (|
                  M.get_trait_method (|
                    "core::cmp::PartialEq",
                    Ty.path "revm_primitives::specification::SpecId",
                    [ Ty.path "revm_primitives::specification::SpecId" ],
                    "eq",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "spec"
                    |);
                    M.SubPointer.get_struct_record_field (|
                      M.read (| other |),
                      "revm::journaled_state::JournaledState",
                      "spec"
                    |)
                  ]
                |)))
            |),
            ltac:(M.monadic
              (M.call_closure (|
                M.get_trait_method (|
                  "core::cmp::PartialEq",
                  Ty.apply
                    (Ty.path "std::collections::hash::set::HashSet")
                    []
                    [
                      Ty.path "alloy_primitives::bits::address::Address";
                      Ty.path "std::hash::random::RandomState"
                    ],
                  [
                    Ty.apply
                      (Ty.path "std::collections::hash::set::HashSet")
                      []
                      [
                        Ty.path "alloy_primitives::bits::address::Address";
                        Ty.path "std::hash::random::RandomState"
                      ]
                  ],
                  "eq",
                  []
                |),
                [
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "revm::journaled_state::JournaledState",
                    "warm_preloaded_addresses"
                  |);
                  M.SubPointer.get_struct_record_field (|
                    M.read (| other |),
                    "revm::journaled_state::JournaledState",
                    "warm_preloaded_addresses"
                  |)
                ]
              |)))
          |)))
      | _, _, _ => 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_journaled_state_JournaledState.
  
  Module Impl_core_cmp_Eq_for_revm_journaled_state_JournaledState.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournaledState".
    
    (* 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.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_journaled_state_JournaledState.
  
  Module Impl_revm_journaled_state_JournaledState.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournaledState".
    
    (*
        pub fn new(spec: SpecId, warm_preloaded_addresses: HashSet<Address>) -> JournaledState {
            Self {
                state: HashMap::new(),
                transient_storage: TransientStorage::default(),
                logs: Vec::new(),
                journal: vec![vec![]],
                depth: 0,
                spec,
                warm_preloaded_addresses,
            }
        }
    *)
    Definition new (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ spec; warm_preloaded_addresses ] =>
        ltac:(M.monadic
          (let spec := M.alloc (| spec |) in
          let warm_preloaded_addresses := M.alloc (| warm_preloaded_addresses |) in
          Value.StructRecord
            "revm::journaled_state::JournaledState"
            [
              ("state",
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "std::collections::hash::map::HashMap")
                      []
                      [
                        Ty.path "alloy_primitives::bits::address::Address";
                        Ty.path "revm_primitives::state::Account";
                        Ty.path "std::hash::random::RandomState"
                      ],
                    "new",
                    []
                  |),
                  []
                |));
              ("transient_storage",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.apply
                      (Ty.path "std::collections::hash::map::HashMap")
                      []
                      [
                        Ty.tuple
                          [
                            Ty.path "alloy_primitives::bits::address::Address";
                            Ty.apply
                              (Ty.path "ruint::Uint")
                              [
                                Value.Integer IntegerKind.Usize 256;
                                Value.Integer IntegerKind.Usize 4
                              ]
                              []
                          ];
                        Ty.apply
                          (Ty.path "ruint::Uint")
                          [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                          [];
                        Ty.path "std::hash::random::RandomState"
                      ],
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("logs",
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [
                        Ty.apply
                          (Ty.path "alloy_primitives::log::Log")
                          []
                          [ Ty.path "alloy_primitives::log::LogData" ];
                        Ty.path "alloc::alloc::Global"
                      ],
                    "new",
                    []
                  |),
                  []
                |));
              ("journal",
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "slice")
                      []
                      [
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [
                            Ty.path "revm::journaled_state::JournalEntry";
                            Ty.path "alloc::alloc::Global"
                          ]
                      ],
                    "into_vec",
                    [ Ty.path "alloc::alloc::Global" ]
                  |),
                  [
                    M.read (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "alloc::boxed::Box")
                            []
                            [
                              Ty.apply
                                (Ty.path "array")
                                [ Value.Integer IntegerKind.Usize 1 ]
                                [
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    []
                                    [
                                      Ty.path "revm::journaled_state::JournalEntry";
                                      Ty.path "alloc::alloc::Global"
                                    ]
                                ];
                              Ty.path "alloc::alloc::Global"
                            ],
                          "new",
                          []
                        |),
                        [
                          M.alloc (|
                            Value.Array
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "new",
                                    []
                                  |),
                                  []
                                |)
                              ]
                          |)
                        ]
                      |)
                    |)
                  ]
                |));
              ("depth", Value.Integer IntegerKind.Usize 0);
              ("spec", M.read (| spec |));
              ("warm_preloaded_addresses", M.read (| warm_preloaded_addresses |))
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new.
    
    (*
        pub fn state(&mut self) -> &mut State {
            &mut self.state
        }
    *)
    Definition state (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.SubPointer.get_struct_record_field (|
            M.read (| self |),
            "revm::journaled_state::JournaledState",
            "state"
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_state : M.IsAssociatedFunction Self "state" state.
    
    (*
        pub fn set_spec_id(&mut self, spec: SpecId) {
            self.spec = spec;
        }
    *)
    Definition set_spec_id (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; spec ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let spec := M.alloc (| spec |) in
          M.read (|
            let~ _ :=
              M.write (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "revm::journaled_state::JournaledState",
                  "spec"
                |),
                M.read (| spec |)
              |) in
            M.alloc (| Value.Tuple [] |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_set_spec_id : M.IsAssociatedFunction Self "set_spec_id" set_spec_id.
    
    (*
        pub fn touch(&mut self, address: &Address) {
            if let Some(account) = self.state.get_mut(address) {
                Self::touch_account(self.journal.last_mut().unwrap(), address, account);
            }
        }
    *)
    Definition touch (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; address ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          M.read (|
            M.match_operator (|
              M.alloc (| Value.Tuple [] |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "std::collections::hash::map::HashMap")
                              []
                              [
                                Ty.path "alloy_primitives::bits::address::Address";
                                Ty.path "revm_primitives::state::Account";
                                Ty.path "std::hash::random::RandomState"
                              ],
                            "get_mut",
                            [ Ty.path "alloy_primitives::bits::address::Address" ]
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm::journaled_state::JournaledState",
                              "state"
                            |);
                            M.read (| address |)
                          ]
                        |)
                      |) in
                    let γ0_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::option::Option::Some",
                        0
                      |) in
                    let account := M.copy (| γ0_0 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "revm::journaled_state::JournaledState",
                            "touch_account",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "core::option::Option")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "&mut")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.path "revm::journaled_state::JournalEntry";
                                            Ty.path "alloc::alloc::Global"
                                          ]
                                      ]
                                  ],
                                "unwrap",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "slice")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.path "revm::journaled_state::JournalEntry";
                                            Ty.path "alloc::alloc::Global"
                                          ]
                                      ],
                                    "last_mut",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "alloc::vec::Vec")
                                              []
                                              [
                                                Ty.path "revm::journaled_state::JournalEntry";
                                                Ty.path "alloc::alloc::Global"
                                              ];
                                            Ty.path "alloc::alloc::Global"
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| self |),
                                          "revm::journaled_state::JournaledState",
                                          "journal"
                                        |)
                                      ]
                                    |)
                                  ]
                                |)
                              ]
                            |);
                            M.read (| address |);
                            M.read (| account |)
                          ]
                        |)
                      |) in
                    M.alloc (| Value.Tuple [] |)));
                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_touch : M.IsAssociatedFunction Self "touch" touch.
    
    (*
        fn touch_account(journal: &mut Vec<JournalEntry>, address: &Address, account: &mut Account) {
            if !account.is_touched() {
                journal.push(JournalEntry::AccountTouched { address: *address });
                account.mark_touch();
            }
        }
    *)
    Definition touch_account (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ journal; address; account ] =>
        ltac:(M.monadic
          (let journal := M.alloc (| journal |) in
          let address := M.alloc (| address |) in
          let account := M.alloc (| account |) in
          M.read (|
            M.match_operator (|
              M.alloc (| Value.Tuple [] |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ :=
                      M.use
                        (M.alloc (|
                          UnOp.not (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path "revm_primitives::state::Account",
                                "is_touched",
                                []
                              |),
                              [ M.read (| account |) ]
                            |)
                          |)
                        |)) 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 "revm::journaled_state::JournalEntry";
                                Ty.path "alloc::alloc::Global"
                              ],
                            "push",
                            []
                          |),
                          [
                            M.read (| journal |);
                            Value.StructRecord
                              "revm::journaled_state::JournalEntry::AccountTouched"
                              [ ("address", M.read (| M.read (| address |) |)) ]
                          ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "revm_primitives::state::Account",
                            "mark_touch",
                            []
                          |),
                          [ M.read (| account |) ]
                        |)
                      |) in
                    M.alloc (| Value.Tuple [] |)));
                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_touch_account :
      M.IsAssociatedFunction Self "touch_account" touch_account.
    
    (*
        pub fn clear(&mut self) {
            let spec = self.spec;
            *self = Self::new(spec, HashSet::new());
        }
    *)
    Definition clear (ε : 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~ spec :=
              M.copy (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "revm::journaled_state::JournaledState",
                  "spec"
                |)
              |) in
            let~ _ :=
              M.write (|
                M.read (| self |),
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "revm::journaled_state::JournaledState",
                    "new",
                    []
                  |),
                  [
                    M.read (| spec |);
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "std::collections::hash::set::HashSet")
                          []
                          [
                            Ty.path "alloy_primitives::bits::address::Address";
                            Ty.path "std::hash::random::RandomState"
                          ],
                        "new",
                        []
                      |),
                      []
                    |)
                  ]
                |)
              |) in
            M.alloc (| Value.Tuple [] |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_clear : M.IsAssociatedFunction Self "clear" clear.
    
    (*
        pub fn finalize(&mut self) -> (State, Vec<Log>) {
            let Self {
                state,
                transient_storage,
                logs,
                depth,
                journal,
                // kept, see [Self::new]
                spec: _,
                warm_preloaded_addresses: _,
            } = self;
    
            *transient_storage = TransientStorage::default();
            *journal = vec![vec![]];
            *depth = 0;
            let state = mem::take(state);
            let logs = mem::take(logs);
    
            (state, logs)
        }
    *)
    Definition finalize (ε : 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 (|
              self,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournaledState",
                        "state"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournaledState",
                        "transient_storage"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournaledState",
                        "logs"
                      |) in
                    let γ1_3 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournaledState",
                        "depth"
                      |) in
                    let γ1_4 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournaledState",
                        "journal"
                      |) in
                    let γ1_5 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournaledState",
                        "spec"
                      |) in
                    let γ1_6 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournaledState",
                        "warm_preloaded_addresses"
                      |) in
                    let state := M.alloc (| γ1_0 |) in
                    let transient_storage := M.alloc (| γ1_1 |) in
                    let logs := M.alloc (| γ1_2 |) in
                    let depth := M.alloc (| γ1_3 |) in
                    let journal := M.alloc (| γ1_4 |) in
                    let~ _ :=
                      M.write (|
                        M.read (| transient_storage |),
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::default::Default",
                            Ty.apply
                              (Ty.path "std::collections::hash::map::HashMap")
                              []
                              [
                                Ty.tuple
                                  [
                                    Ty.path "alloy_primitives::bits::address::Address";
                                    Ty.apply
                                      (Ty.path "ruint::Uint")
                                      [
                                        Value.Integer IntegerKind.Usize 256;
                                        Value.Integer IntegerKind.Usize 4
                                      ]
                                      []
                                  ];
                                Ty.apply
                                  (Ty.path "ruint::Uint")
                                  [
                                    Value.Integer IntegerKind.Usize 256;
                                    Value.Integer IntegerKind.Usize 4
                                  ]
                                  [];
                                Ty.path "std::hash::random::RandomState"
                              ],
                            [],
                            "default",
                            []
                          |),
                          []
                        |)
                      |) in
                    let~ _ :=
                      M.write (|
                        M.read (| journal |),
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "revm::journaled_state::JournalEntry";
                                    Ty.path "alloc::alloc::Global"
                                  ]
                              ],
                            "into_vec",
                            [ Ty.path "alloc::alloc::Global" ]
                          |),
                          [
                            M.read (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::boxed::Box")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "array")
                                        [ Value.Integer IntegerKind.Usize 1 ]
                                        [
                                          Ty.apply
                                            (Ty.path "alloc::vec::Vec")
                                            []
                                            [
                                              Ty.path "revm::journaled_state::JournalEntry";
                                              Ty.path "alloc::alloc::Global"
                                            ]
                                        ];
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  "new",
                                  []
                                |),
                                [
                                  M.alloc (|
                                    Value.Array
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "alloc::vec::Vec")
                                              []
                                              [
                                                Ty.path "revm::journaled_state::JournalEntry";
                                                Ty.path "alloc::alloc::Global"
                                              ],
                                            "new",
                                            []
                                          |),
                                          []
                                        |)
                                      ]
                                  |)
                                ]
                              |)
                            |)
                          ]
                        |)
                      |) in
                    let~ _ := M.write (| M.read (| depth |), Value.Integer IntegerKind.Usize 0 |) in
                    let~ state :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_function (|
                            "core::mem::take",
                            [
                              Ty.apply
                                (Ty.path "std::collections::hash::map::HashMap")
                                []
                                [
                                  Ty.path "alloy_primitives::bits::address::Address";
                                  Ty.path "revm_primitives::state::Account";
                                  Ty.path "std::hash::random::RandomState"
                                ]
                            ]
                          |),
                          [ M.read (| state |) ]
                        |)
                      |) in
                    let~ logs :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_function (|
                            "core::mem::take",
                            [
                              Ty.apply
                                (Ty.path "alloc::vec::Vec")
                                []
                                [
                                  Ty.apply
                                    (Ty.path "alloy_primitives::log::Log")
                                    []
                                    [ Ty.path "alloy_primitives::log::LogData" ];
                                  Ty.path "alloc::alloc::Global"
                                ]
                            ]
                          |),
                          [ M.read (| logs |) ]
                        |)
                      |) in
                    M.alloc (| Value.Tuple [ M.read (| state |); M.read (| logs |) ] |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_finalize : M.IsAssociatedFunction Self "finalize" finalize.
    
    (*
        pub fn account(&self, address: Address) -> &Account {
            self.state
                .get(&address)
                .expect("Account expected to be loaded") // Always assume that acc is already loaded
        }
    *)
    Definition account (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; address ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply
                (Ty.path "core::option::Option")
                []
                [ Ty.apply (Ty.path "&") [] [ Ty.path "revm_primitives::state::Account" ] ],
              "expect",
              []
            |),
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "std::collections::hash::map::HashMap")
                    []
                    [
                      Ty.path "alloy_primitives::bits::address::Address";
                      Ty.path "revm_primitives::state::Account";
                      Ty.path "std::hash::random::RandomState"
                    ],
                  "get",
                  [ Ty.path "alloy_primitives::bits::address::Address" ]
                |),
                [
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "revm::journaled_state::JournaledState",
                    "state"
                  |);
                  address
                ]
              |);
              M.read (| Value.String "Account expected to be loaded" |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_account : M.IsAssociatedFunction Self "account" account.
    
    (*
        pub fn depth(&self) -> u64 {
            self.depth as u64
        }
    *)
    Definition depth (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.rust_cast
            (M.read (|
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "revm::journaled_state::JournaledState",
                "depth"
              |)
            |))))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_depth : M.IsAssociatedFunction Self "depth" depth.
    
    (*
        pub fn set_code(&mut self, address: Address, code: Bytecode) {
            let account = self.state.get_mut(&address).unwrap();
            Self::touch_account(self.journal.last_mut().unwrap(), &address, account);
    
            self.journal
                .last_mut()
                .unwrap()
                .push(JournalEntry::CodeChange { address });
    
            account.info.code_hash = code.hash_slow();
            account.info.code = Some(code);
        }
    *)
    Definition set_code (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; address; code ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          let code := M.alloc (| code |) in
          M.read (|
            let~ account :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "core::option::Option")
                      []
                      [ Ty.apply (Ty.path "&mut") [] [ Ty.path "revm_primitives::state::Account" ]
                      ],
                    "unwrap",
                    []
                  |),
                  [
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "std::collections::hash::map::HashMap")
                          []
                          [
                            Ty.path "alloy_primitives::bits::address::Address";
                            Ty.path "revm_primitives::state::Account";
                            Ty.path "std::hash::random::RandomState"
                          ],
                        "get_mut",
                        [ Ty.path "alloy_primitives::bits::address::Address" ]
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "revm::journaled_state::JournaledState",
                          "state"
                        |);
                        address
                      ]
                    |)
                  ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "revm::journaled_state::JournaledState",
                    "touch_account",
                    []
                  |),
                  [
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "core::option::Option")
                          []
                          [
                            Ty.apply
                              (Ty.path "&mut")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "revm::journaled_state::JournalEntry";
                                    Ty.path "alloc::alloc::Global"
                                  ]
                              ]
                          ],
                        "unwrap",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "revm::journaled_state::JournalEntry";
                                    Ty.path "alloc::alloc::Global"
                                  ]
                              ],
                            "last_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::DerefMut",
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref_mut",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "revm::journaled_state::JournaledState",
                                  "journal"
                                |)
                              ]
                            |)
                          ]
                        |)
                      ]
                    |);
                    address;
                    M.read (| account |)
                  ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [
                        Ty.path "revm::journaled_state::JournalEntry";
                        Ty.path "alloc::alloc::Global"
                      ],
                    "push",
                    []
                  |),
                  [
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "core::option::Option")
                          []
                          [
                            Ty.apply
                              (Ty.path "&mut")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "revm::journaled_state::JournalEntry";
                                    Ty.path "alloc::alloc::Global"
                                  ]
                              ]
                          ],
                        "unwrap",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "revm::journaled_state::JournalEntry";
                                    Ty.path "alloc::alloc::Global"
                                  ]
                              ],
                            "last_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::DerefMut",
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref_mut",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "revm::journaled_state::JournaledState",
                                  "journal"
                                |)
                              ]
                            |)
                          ]
                        |)
                      ]
                    |);
                    Value.StructRecord
                      "revm::journaled_state::JournalEntry::CodeChange"
                      [ ("address", M.read (| address |)) ]
                  ]
                |)
              |) in
            let~ _ :=
              M.write (|
                M.SubPointer.get_struct_record_field (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| account |),
                    "revm_primitives::state::Account",
                    "info"
                  |),
                  "revm_primitives::state::AccountInfo",
                  "code_hash"
                |),
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "revm_primitives::bytecode::Bytecode",
                    "hash_slow",
                    []
                  |),
                  [ code ]
                |)
              |) in
            let~ _ :=
              M.write (|
                M.SubPointer.get_struct_record_field (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| account |),
                    "revm_primitives::state::Account",
                    "info"
                  |),
                  "revm_primitives::state::AccountInfo",
                  "code"
                |),
                Value.StructTuple "core::option::Option::Some" [ M.read (| code |) ]
              |) in
            M.alloc (| Value.Tuple [] |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_set_code : M.IsAssociatedFunction Self "set_code" set_code.
    
    (*
        pub fn inc_nonce(&mut self, address: Address) -> Option<u64> {
            let account = self.state.get_mut(&address).unwrap();
            // Check if nonce is going to overflow.
            if account.info.nonce == u64::MAX {
                return None;
            }
            Self::touch_account(self.journal.last_mut().unwrap(), &address, account);
            self.journal
                .last_mut()
                .unwrap()
                .push(JournalEntry::NonceChange { address });
    
            account.info.nonce += 1;
    
            Some(account.info.nonce)
        }
    *)
    Definition inc_nonce (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; address ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ account :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "core::option::Option")
                          []
                          [
                            Ty.apply
                              (Ty.path "&mut")
                              []
                              [ Ty.path "revm_primitives::state::Account" ]
                          ],
                        "unwrap",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "std::collections::hash::map::HashMap")
                              []
                              [
                                Ty.path "alloy_primitives::bits::address::Address";
                                Ty.path "revm_primitives::state::Account";
                                Ty.path "std::hash::random::RandomState"
                              ],
                            "get_mut",
                            [ Ty.path "alloy_primitives::bits::address::Address" ]
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm::journaled_state::JournaledState",
                              "state"
                            |);
                            address
                          ]
                        |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                BinOp.eq (|
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| account |),
                                        "revm_primitives::state::Account",
                                        "info"
                                      |),
                                      "revm_primitives::state::AccountInfo",
                                      "nonce"
                                    |)
                                  |),
                                  M.read (| M.get_constant (| "core::num::MAX" |) |)
                                |)
                              |)) 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::option::Option::None" [] |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "revm::journaled_state::JournaledState",
                        "touch_account",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::option::Option")
                              []
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ]
                                  ]
                              ],
                            "unwrap",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "slice")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ]
                                  ],
                                "last_mut",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::deref::DerefMut",
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.path "revm::journaled_state::JournalEntry";
                                            Ty.path "alloc::alloc::Global"
                                          ];
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    [],
                                    "deref_mut",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "revm::journaled_state::JournaledState",
                                      "journal"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          ]
                        |);
                        address;
                        M.read (| account |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [
                            Ty.path "revm::journaled_state::JournalEntry";
                            Ty.path "alloc::alloc::Global"
                          ],
                        "push",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::option::Option")
                              []
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ]
                                  ]
                              ],
                            "unwrap",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "slice")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ]
                                  ],
                                "last_mut",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::deref::DerefMut",
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.path "revm::journaled_state::JournalEntry";
                                            Ty.path "alloc::alloc::Global"
                                          ];
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    [],
                                    "deref_mut",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "revm::journaled_state::JournaledState",
                                      "journal"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          ]
                        |);
                        Value.StructRecord
                          "revm::journaled_state::JournalEntry::NonceChange"
                          [ ("address", M.read (| address |)) ]
                      ]
                    |)
                  |) in
                let~ _ :=
                  let β :=
                    M.SubPointer.get_struct_record_field (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| account |),
                        "revm_primitives::state::Account",
                        "info"
                      |),
                      "revm_primitives::state::AccountInfo",
                      "nonce"
                    |) in
                  M.write (|
                    β,
                    BinOp.Wrap.add (| M.read (| β |), Value.Integer IntegerKind.U64 1 |)
                  |) in
                M.alloc (|
                  Value.StructTuple
                    "core::option::Option::Some"
                    [
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.SubPointer.get_struct_record_field (|
                            M.read (| account |),
                            "revm_primitives::state::Account",
                            "info"
                          |),
                          "revm_primitives::state::AccountInfo",
                          "nonce"
                        |)
                      |)
                    ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_inc_nonce : M.IsAssociatedFunction Self "inc_nonce" inc_nonce.
    
    (*
        pub fn transfer<DB: Database>(
            &mut self,
            from: &Address,
            to: &Address,
            balance: U256,
            db: &mut DB,
        ) -> Result<Option<InstructionResult>, EVMError<DB::Error>> {
            // load accounts
            self.load_account( *from, db)?;
            self.load_account( *to, db)?;
    
            // sub balance from
            let from_account = &mut self.state.get_mut(from).unwrap();
            Self::touch_account(self.journal.last_mut().unwrap(), from, from_account);
            let from_balance = &mut from_account.info.balance;
    
            let Some(from_balance_incr) = from_balance.checked_sub(balance) else {
                return Ok(Some(InstructionResult::OutOfFunds));
            };
            *from_balance = from_balance_incr;
    
            // add balance to
            let to_account = &mut self.state.get_mut(to).unwrap();
            Self::touch_account(self.journal.last_mut().unwrap(), to, to_account);
            let to_balance = &mut to_account.info.balance;
            let Some(to_balance_decr) = to_balance.checked_add(balance) else {
                return Ok(Some(InstructionResult::OverflowPayment));
            };
            *to_balance = to_balance_decr;
            // Overflow of U256 balance is not possible to happen on mainnet. We don't bother to return funds from from_acc.
    
            self.journal
                .last_mut()
                .unwrap()
                .push(JournalEntry::BalanceTransfer {
                    from: *from,
                    to: *to,
                    balance,
                });
    
            Ok(None)
        }
    *)
    Definition transfer (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ DB ], [ self; from; to; balance; db ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let from := M.alloc (| from |) in
          let to := M.alloc (| to |) in
          let balance := M.alloc (| balance |) in
          let db := M.alloc (| db |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ _ :=
                  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 "&mut")
                                    []
                                    [ Ty.path "revm_primitives::state::Account" ];
                                  Ty.path "bool"
                                ];
                              Ty.apply
                                (Ty.path "revm_primitives::result::EVMError")
                                []
                                [ Ty.associated ]
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "revm::journaled_state::JournaledState",
                              "load_account",
                              [ DB ]
                            |),
                            [ M.read (| self |); M.read (| M.read (| from |) |); M.read (| db |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.apply
                                            (Ty.path "core::option::Option")
                                            []
                                            [
                                              Ty.path
                                                "revm_interpreter::instruction_result::InstructionResult"
                                            ];
                                          Ty.apply
                                            (Ty.path "revm_primitives::result::EVMError")
                                            []
                                            [ Ty.associated ]
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.apply
                                              (Ty.path "revm_primitives::result::EVMError")
                                              []
                                              [ Ty.associated ]
                                          ]
                                      ],
                                      "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))
                    ]
                  |) in
                let~ _ :=
                  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 "&mut")
                                    []
                                    [ Ty.path "revm_primitives::state::Account" ];
                                  Ty.path "bool"
                                ];
                              Ty.apply
                                (Ty.path "revm_primitives::result::EVMError")
                                []
                                [ Ty.associated ]
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "revm::journaled_state::JournaledState",
                              "load_account",
                              [ DB ]
                            |),
                            [ M.read (| self |); M.read (| M.read (| to |) |); M.read (| db |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.apply
                                            (Ty.path "core::option::Option")
                                            []
                                            [
                                              Ty.path
                                                "revm_interpreter::instruction_result::InstructionResult"
                                            ];
                                          Ty.apply
                                            (Ty.path "revm_primitives::result::EVMError")
                                            []
                                            [ Ty.associated ]
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.apply
                                              (Ty.path "revm_primitives::result::EVMError")
                                              []
                                              [ Ty.associated ]
                                          ]
                                      ],
                                      "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))
                    ]
                  |) in
                let~ from_account :=
                  M.alloc (|
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "core::option::Option")
                            []
                            [
                              Ty.apply
                                (Ty.path "&mut")
                                []
                                [ Ty.path "revm_primitives::state::Account" ]
                            ],
                          "unwrap",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "std::collections::hash::map::HashMap")
                                []
                                [
                                  Ty.path "alloy_primitives::bits::address::Address";
                                  Ty.path "revm_primitives::state::Account";
                                  Ty.path "std::hash::random::RandomState"
                                ],
                              "get_mut",
                              [ Ty.path "alloy_primitives::bits::address::Address" ]
                            |),
                            [
                              M.SubPointer.get_struct_record_field (|
                                M.read (| self |),
                                "revm::journaled_state::JournaledState",
                                "state"
                              |);
                              M.read (| from |)
                            ]
                          |)
                        ]
                      |)
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "revm::journaled_state::JournaledState",
                        "touch_account",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::option::Option")
                              []
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ]
                                  ]
                              ],
                            "unwrap",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "slice")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ]
                                  ],
                                "last_mut",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::deref::DerefMut",
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.path "revm::journaled_state::JournalEntry";
                                            Ty.path "alloc::alloc::Global"
                                          ];
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    [],
                                    "deref_mut",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "revm::journaled_state::JournaledState",
                                      "journal"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          ]
                        |);
                        M.read (| from |);
                        M.read (| M.read (| from_account |) |)
                      ]
                    |)
                  |) in
                let~ from_balance :=
                  M.alloc (|
                    M.SubPointer.get_struct_record_field (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| M.read (| from_account |) |),
                        "revm_primitives::state::Account",
                        "info"
                      |),
                      "revm_primitives::state::AccountInfo",
                      "balance"
                    |)
                  |) in
                M.match_operator (|
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "ruint::Uint")
                          [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                          [],
                        "checked_sub",
                        []
                      |),
                      [ M.read (| M.read (| from_balance |) |); M.read (| balance |) ]
                    |)
                  |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::option::Option::Some",
                            0
                          |) in
                        let from_balance_incr := M.copy (| γ0_0 |) in
                        let~ _ :=
                          M.write (| M.read (| from_balance |), M.read (| from_balance_incr |) |) in
                        let~ to_account :=
                          M.alloc (|
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "core::option::Option")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "&mut")
                                        []
                                        [ Ty.path "revm_primitives::state::Account" ]
                                    ],
                                  "unwrap",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "std::collections::hash::map::HashMap")
                                        []
                                        [
                                          Ty.path "alloy_primitives::bits::address::Address";
                                          Ty.path "revm_primitives::state::Account";
                                          Ty.path "std::hash::random::RandomState"
                                        ],
                                      "get_mut",
                                      [ Ty.path "alloy_primitives::bits::address::Address" ]
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "revm::journaled_state::JournaledState",
                                        "state"
                                      |);
                                      M.read (| to |)
                                    ]
                                  |)
                                ]
                              |)
                            |)
                          |) in
                        let~ _ :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path "revm::journaled_state::JournaledState",
                                "touch_account",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::option::Option")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "alloc::vec::Vec")
                                              []
                                              [
                                                Ty.path "revm::journaled_state::JournalEntry";
                                                Ty.path "alloc::alloc::Global"
                                              ]
                                          ]
                                      ],
                                    "unwrap",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "slice")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "alloc::vec::Vec")
                                              []
                                              [
                                                Ty.path "revm::journaled_state::JournalEntry";
                                                Ty.path "alloc::alloc::Global"
                                              ]
                                          ],
                                        "last_mut",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::ops::deref::DerefMut",
                                            Ty.apply
                                              (Ty.path "alloc::vec::Vec")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path "revm::journaled_state::JournalEntry";
                                                    Ty.path "alloc::alloc::Global"
                                                  ];
                                                Ty.path "alloc::alloc::Global"
                                              ],
                                            [],
                                            "deref_mut",
                                            []
                                          |),
                                          [
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| self |),
                                              "revm::journaled_state::JournaledState",
                                              "journal"
                                            |)
                                          ]
                                        |)
                                      ]
                                    |)
                                  ]
                                |);
                                M.read (| to |);
                                M.read (| M.read (| to_account |) |)
                              ]
                            |)
                          |) in
                        let~ to_balance :=
                          M.alloc (|
                            M.SubPointer.get_struct_record_field (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (| M.read (| to_account |) |),
                                "revm_primitives::state::Account",
                                "info"
                              |),
                              "revm_primitives::state::AccountInfo",
                              "balance"
                            |)
                          |) in
                        M.match_operator (|
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "ruint::Uint")
                                  [
                                    Value.Integer IntegerKind.Usize 256;
                                    Value.Integer IntegerKind.Usize 4
                                  ]
                                  [],
                                "checked_add",
                                []
                              |),
                              [ M.read (| M.read (| to_balance |) |); M.read (| balance |) ]
                            |)
                          |),
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let γ0_0 :=
                                  M.SubPointer.get_struct_tuple_field (|
                                    γ,
                                    "core::option::Option::Some",
                                    0
                                  |) in
                                let to_balance_decr := M.copy (| γ0_0 |) in
                                let~ _ :=
                                  M.write (|
                                    M.read (| to_balance |),
                                    M.read (| to_balance_decr |)
                                  |) in
                                let~ _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.path "revm::journaled_state::JournalEntry";
                                            Ty.path "alloc::alloc::Global"
                                          ],
                                        "push",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "core::option::Option")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "&mut")
                                                  []
                                                  [
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      []
                                                      [
                                                        Ty.path
                                                          "revm::journaled_state::JournalEntry";
                                                        Ty.path "alloc::alloc::Global"
                                                      ]
                                                  ]
                                              ],
                                            "unwrap",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "slice")
                                                  []
                                                  [
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      []
                                                      [
                                                        Ty.path
                                                          "revm::journaled_state::JournalEntry";
                                                        Ty.path "alloc::alloc::Global"
                                                      ]
                                                  ],
                                                "last_mut",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::deref::DerefMut",
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      []
                                                      [
                                                        Ty.apply
                                                          (Ty.path "alloc::vec::Vec")
                                                          []
                                                          [
                                                            Ty.path
                                                              "revm::journaled_state::JournalEntry";
                                                            Ty.path "alloc::alloc::Global"
                                                          ];
                                                        Ty.path "alloc::alloc::Global"
                                                      ],
                                                    [],
                                                    "deref_mut",
                                                    []
                                                  |),
                                                  [
                                                    M.SubPointer.get_struct_record_field (|
                                                      M.read (| self |),
                                                      "revm::journaled_state::JournaledState",
                                                      "journal"
                                                    |)
                                                  ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |);
                                        Value.StructRecord
                                          "revm::journaled_state::JournalEntry::BalanceTransfer"
                                          [
                                            ("from", M.read (| M.read (| from |) |));
                                            ("to", M.read (| M.read (| to |) |));
                                            ("balance", M.read (| balance |))
                                          ]
                                      ]
                                    |)
                                  |) in
                                M.alloc (|
                                  Value.StructTuple
                                    "core::result::Result::Ok"
                                    [ Value.StructTuple "core::option::Option::None" [] ]
                                |)))
                          ]
                        |)))
                  ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_transfer : M.IsAssociatedFunction Self "transfer" transfer.
    
    (*
        pub fn create_account_checkpoint(
            &mut self,
            caller: Address,
            address: Address,
            balance: U256,
            spec_id: SpecId,
        ) -> Result<JournalCheckpoint, InstructionResult> {
            // Enter subroutine
            let checkpoint = self.checkpoint();
    
            // Newly created account is present, as we just loaded it.
            let account = self.state.get_mut(&address).unwrap();
            let last_journal = self.journal.last_mut().unwrap();
    
            // New account can be created if:
            // Bytecode is not empty.
            // Nonce is not zero
            // Account is not precompile.
            if account.info.code_hash != KECCAK_EMPTY
                || account.info.nonce != 0
                || self.warm_preloaded_addresses.contains(&address)
            {
                self.checkpoint_revert(checkpoint);
                return Err(InstructionResult::CreateCollision);
            }
    
            // set account status to created.
            account.mark_created();
    
            // this entry will revert set nonce.
            last_journal.push(JournalEntry::AccountCreated { address });
            account.info.code = None;
    
            // Set all storages to default value. They need to be present to act as accessed slots in access list.
            // it shouldn't be possible for them to have different values then zero as code is not existing for this account,
            // but because tests can change that assumption we are doing it.
            let empty = StorageSlot::default();
            account
                .storage
                .iter_mut()
                .for_each(|(_, slot)| *slot = empty.clone());
    
            // touch account. This is important as for pre SpuriousDragon account could be
            // saved even empty.
            Self::touch_account(last_journal, &address, account);
    
            // Add balance to created account, as we already have target here.
            let Some(new_balance) = account.info.balance.checked_add(balance) else {
                self.checkpoint_revert(checkpoint);
                return Err(InstructionResult::OverflowPayment);
            };
            account.info.balance = new_balance;
    
            // EIP-161: State trie clearing (invariant-preserving alternative)
            if spec_id.is_enabled_in(SPURIOUS_DRAGON) {
                // nonce is going to be reset to zero in AccountCreated journal entry.
                account.info.nonce = 1;
            }
    
            // Sub balance from caller
            let caller_account = self.state.get_mut(&caller).unwrap();
            // Balance is already checked in `create_inner`, so it is safe to just subtract.
            caller_account.info.balance -= balance;
    
            // add journal entry of transferred balance
            last_journal.push(JournalEntry::BalanceTransfer {
                from: caller,
                to: address,
                balance,
            });
    
            Ok(checkpoint)
        }
    *)
    Definition create_account_checkpoint
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self; caller; address; balance; spec_id ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let caller := M.alloc (| caller |) in
          let address := M.alloc (| address |) in
          let balance := M.alloc (| balance |) in
          let spec_id := M.alloc (| spec_id |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ checkpoint :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "revm::journaled_state::JournaledState",
                        "checkpoint",
                        []
                      |),
                      [ M.read (| self |) ]
                    |)
                  |) in
                let~ account :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "core::option::Option")
                          []
                          [
                            Ty.apply
                              (Ty.path "&mut")
                              []
                              [ Ty.path "revm_primitives::state::Account" ]
                          ],
                        "unwrap",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "std::collections::hash::map::HashMap")
                              []
                              [
                                Ty.path "alloy_primitives::bits::address::Address";
                                Ty.path "revm_primitives::state::Account";
                                Ty.path "std::hash::random::RandomState"
                              ],
                            "get_mut",
                            [ Ty.path "alloy_primitives::bits::address::Address" ]
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm::journaled_state::JournaledState",
                              "state"
                            |);
                            address
                          ]
                        |)
                      ]
                    |)
                  |) in
                let~ last_journal :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "core::option::Option")
                          []
                          [
                            Ty.apply
                              (Ty.path "&mut")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "revm::journaled_state::JournalEntry";
                                    Ty.path "alloc::alloc::Global"
                                  ]
                              ]
                          ],
                        "unwrap",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "revm::journaled_state::JournalEntry";
                                    Ty.path "alloc::alloc::Global"
                                  ]
                              ],
                            "last_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::DerefMut",
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref_mut",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "revm::journaled_state::JournaledState",
                                  "journal"
                                |)
                              ]
                            |)
                          ]
                        |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                LogicalOp.or (|
                                  LogicalOp.or (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::cmp::PartialEq",
                                        Ty.apply
                                          (Ty.path "alloy_primitives::bits::fixed::FixedBytes")
                                          [ Value.Integer IntegerKind.Usize 32 ]
                                          [],
                                        [
                                          Ty.apply
                                            (Ty.path "alloy_primitives::bits::fixed::FixedBytes")
                                            [ Value.Integer IntegerKind.Usize 32 ]
                                            []
                                        ],
                                        "ne",
                                        []
                                      |),
                                      [
                                        M.SubPointer.get_struct_record_field (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| account |),
                                            "revm_primitives::state::Account",
                                            "info"
                                          |),
                                          "revm_primitives::state::AccountInfo",
                                          "code_hash"
                                        |);
                                        M.get_constant (|
                                          "revm_primitives::utilities::KECCAK_EMPTY"
                                        |)
                                      ]
                                    |),
                                    ltac:(M.monadic
                                      (BinOp.ne (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| account |),
                                              "revm_primitives::state::Account",
                                              "info"
                                            |),
                                            "revm_primitives::state::AccountInfo",
                                            "nonce"
                                          |)
                                        |),
                                        Value.Integer IntegerKind.U64 0
                                      |)))
                                  |),
                                  ltac:(M.monadic
                                    (M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "std::collections::hash::set::HashSet")
                                          []
                                          [
                                            Ty.path "alloy_primitives::bits::address::Address";
                                            Ty.path "std::hash::random::RandomState"
                                          ],
                                        "contains",
                                        [ Ty.path "alloy_primitives::bits::address::Address" ]
                                      |),
                                      [
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| self |),
                                          "revm::journaled_state::JournaledState",
                                          "warm_preloaded_addresses"
                                        |);
                                        address
                                      ]
                                    |)))
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                let~ _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "revm::journaled_state::JournaledState",
                                        "checkpoint_revert",
                                        []
                                      |),
                                      [ M.read (| self |); M.read (| checkpoint |) ]
                                    |)
                                  |) in
                                M.return_ (|
                                  Value.StructTuple
                                    "core::result::Result::Err"
                                    [
                                      Value.StructTuple
                                        "revm_interpreter::instruction_result::InstructionResult::CreateCollision"
                                        []
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "revm_primitives::state::Account",
                        "mark_created",
                        []
                      |),
                      [ M.read (| account |) ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [
                            Ty.path "revm::journaled_state::JournalEntry";
                            Ty.path "alloc::alloc::Global"
                          ],
                        "push",
                        []
                      |),
                      [
                        M.read (| last_journal |);
                        Value.StructRecord
                          "revm::journaled_state::JournalEntry::AccountCreated"
                          [ ("address", M.read (| address |)) ]
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| account |),
                        "revm_primitives::state::Account",
                        "info"
                      |),
                      "revm_primitives::state::AccountInfo",
                      "code"
                    |),
                    Value.StructTuple "core::option::Option::None" []
                  |) in
                let~ empty :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::default::Default",
                        Ty.path "revm_primitives::state::StorageSlot",
                        [],
                        "default",
                        []
                      |),
                      []
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::traits::iterator::Iterator",
                        Ty.apply
                          (Ty.path "std::collections::hash::map::IterMut")
                          []
                          [
                            Ty.apply
                              (Ty.path "ruint::Uint")
                              [
                                Value.Integer IntegerKind.Usize 256;
                                Value.Integer IntegerKind.Usize 4
                              ]
                              [];
                            Ty.path "revm_primitives::state::StorageSlot"
                          ],
                        [],
                        "for_each",
                        [
                          Ty.function
                            [
                              Ty.tuple
                                [
                                  Ty.tuple
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "ruint::Uint")
                                            [
                                              Value.Integer IntegerKind.Usize 256;
                                              Value.Integer IntegerKind.Usize 4
                                            ]
                                            []
                                        ];
                                      Ty.apply
                                        (Ty.path "&mut")
                                        []
                                        [ Ty.path "revm_primitives::state::StorageSlot" ]
                                    ]
                                ]
                            ]
                            (Ty.tuple [])
                        ]
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "std::collections::hash::map::HashMap")
                              []
                              [
                                Ty.apply
                                  (Ty.path "ruint::Uint")
                                  [
                                    Value.Integer IntegerKind.Usize 256;
                                    Value.Integer IntegerKind.Usize 4
                                  ]
                                  [];
                                Ty.path "revm_primitives::state::StorageSlot";
                                Ty.path "std::hash::random::RandomState"
                              ],
                            "iter_mut",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| account |),
                              "revm_primitives::state::Account",
                              "storage"
                            |)
                          ]
                        |);
                        M.closure
                          (fun γ =>
                            ltac:(M.monadic
                              match γ with
                              | [ α0 ] =>
                                ltac:(M.monadic
                                  (M.match_operator (|
                                    M.alloc (| α0 |),
                                    [
                                      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 slot := M.copy (| γ0_1 |) in
                                          M.read (|
                                            M.write (|
                                              M.read (| slot |),
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::clone::Clone",
                                                  Ty.path "revm_primitives::state::StorageSlot",
                                                  [],
                                                  "clone",
                                                  []
                                                |),
                                                [ empty ]
                                              |)
                                            |)
                                          |)))
                                    ]
                                  |)))
                              | _ => M.impossible "wrong number of arguments"
                              end))
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "revm::journaled_state::JournaledState",
                        "touch_account",
                        []
                      |),
                      [ M.read (| last_journal |); address; M.read (| account |) ]
                    |)
                  |) in
                M.match_operator (|
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "ruint::Uint")
                          [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                          [],
                        "checked_add",
                        []
                      |),
                      [
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| account |),
                              "revm_primitives::state::Account",
                              "info"
                            |),
                            "revm_primitives::state::AccountInfo",
                            "balance"
                          |)
                        |);
                        M.read (| balance |)
                      ]
                    |)
                  |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::option::Option::Some",
                            0
                          |) in
                        let new_balance := M.copy (| γ0_0 |) in
                        let~ _ :=
                          M.write (|
                            M.SubPointer.get_struct_record_field (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (| account |),
                                "revm_primitives::state::Account",
                                "info"
                              |),
                              "revm_primitives::state::AccountInfo",
                              "balance"
                            |),
                            M.read (| new_balance |)
                          |) 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.path "revm_primitives::specification::SpecId",
                                            "is_enabled_in",
                                            []
                                          |),
                                          [
                                            M.read (| spec_id |);
                                            Value.StructTuple
                                              "revm_primitives::specification::SpecId::SPURIOUS_DRAGON"
                                              []
                                          ]
                                        |)
                                      |)) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  let~ _ :=
                                    M.write (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| account |),
                                          "revm_primitives::state::Account",
                                          "info"
                                        |),
                                        "revm_primitives::state::AccountInfo",
                                        "nonce"
                                      |),
                                      Value.Integer IntegerKind.U64 1
                                    |) in
                                  M.alloc (| Value.Tuple [] |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |) in
                        let~ caller_account :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "core::option::Option")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "&mut")
                                      []
                                      [ Ty.path "revm_primitives::state::Account" ]
                                  ],
                                "unwrap",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "std::collections::hash::map::HashMap")
                                      []
                                      [
                                        Ty.path "alloy_primitives::bits::address::Address";
                                        Ty.path "revm_primitives::state::Account";
                                        Ty.path "std::hash::random::RandomState"
                                      ],
                                    "get_mut",
                                    [ Ty.path "alloy_primitives::bits::address::Address" ]
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "revm::journaled_state::JournaledState",
                                      "state"
                                    |);
                                    caller
                                  ]
                                |)
                              ]
                            |)
                          |) in
                        let~ _ :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::arith::SubAssign",
                                Ty.apply
                                  (Ty.path "ruint::Uint")
                                  [
                                    Value.Integer IntegerKind.Usize 256;
                                    Value.Integer IntegerKind.Usize 4
                                  ]
                                  [],
                                [
                                  Ty.apply
                                    (Ty.path "ruint::Uint")
                                    [
                                      Value.Integer IntegerKind.Usize 256;
                                      Value.Integer IntegerKind.Usize 4
                                    ]
                                    []
                                ],
                                "sub_assign",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| caller_account |),
                                    "revm_primitives::state::Account",
                                    "info"
                                  |),
                                  "revm_primitives::state::AccountInfo",
                                  "balance"
                                |);
                                M.read (| balance |)
                              ]
                            |)
                          |) in
                        let~ _ :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "revm::journaled_state::JournalEntry";
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                "push",
                                []
                              |),
                              [
                                M.read (| last_journal |);
                                Value.StructRecord
                                  "revm::journaled_state::JournalEntry::BalanceTransfer"
                                  [
                                    ("from", M.read (| caller |));
                                    ("to", M.read (| address |));
                                    ("balance", M.read (| balance |))
                                  ]
                              ]
                            |)
                          |) in
                        M.alloc (|
                          Value.StructTuple "core::result::Result::Ok" [ M.read (| checkpoint |) ]
                        |)))
                  ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_create_account_checkpoint :
      M.IsAssociatedFunction Self "create_account_checkpoint" create_account_checkpoint.
    
    (*
        fn journal_revert(
            state: &mut State,
            transient_storage: &mut TransientStorage,
            journal_entries: Vec<JournalEntry>,
            is_spurious_dragon_enabled: bool,
        ) {
            for entry in journal_entries.into_iter().rev() {
                match entry {
                    JournalEntry::AccountLoaded { address } => {
                        state.remove(&address);
                    }
                    JournalEntry::AccountTouched { address } => {
                        if is_spurious_dragon_enabled && address == PRECOMPILE3 {
                            continue;
                        }
                        // remove touched status
                        state.get_mut(&address).unwrap().unmark_touch();
                    }
                    JournalEntry::AccountDestroyed {
                        address,
                        target,
                        was_destroyed,
                        had_balance,
                    } => {
                        let account = state.get_mut(&address).unwrap();
                        // set previous state of selfdestructed flag, as there could be multiple
                        // selfdestructs in one transaction.
                        if was_destroyed {
                            // flag is still selfdestructed
                            account.mark_selfdestruct();
                        } else {
                            // flag that is not selfdestructed
                            account.unmark_selfdestruct();
                        }
                        account.info.balance += had_balance;
    
                        if address != target {
                            let target = state.get_mut(&target).unwrap();
                            target.info.balance -= had_balance;
                        }
                    }
                    JournalEntry::BalanceTransfer { from, to, balance } => {
                        // we don't need to check overflow and underflow when adding and subtracting the balance.
                        let from = state.get_mut(&from).unwrap();
                        from.info.balance += balance;
                        let to = state.get_mut(&to).unwrap();
                        to.info.balance -= balance;
                    }
                    JournalEntry::NonceChange { address } => {
                        state.get_mut(&address).unwrap().info.nonce -= 1;
                    }
                    JournalEntry::AccountCreated { address } => {
                        let account = &mut state.get_mut(&address).unwrap();
                        account.unmark_created();
                        account.info.nonce = 0;
                    }
                    JournalEntry::StorageChange {
                        address,
                        key,
                        had_value,
                    } => {
                        let storage = &mut state.get_mut(&address).unwrap().storage;
                        if let Some(had_value) = had_value {
                            storage.get_mut(&key).unwrap().present_value = had_value;
                        } else {
                            storage.remove(&key);
                        }
                    }
                    JournalEntry::TransientStorageChange {
                        address,
                        key,
                        had_value,
                    } => {
                        let tkey = (address, key);
                        if had_value == U256::ZERO {
                            // if previous value is zero, remove it
                            transient_storage.remove(&tkey);
                        } else {
                            // if not zero, reinsert old value to transient storage.
                            transient_storage.insert(tkey, had_value);
                        }
                    }
                    JournalEntry::CodeChange { address } => {
                        let acc = state.get_mut(&address).unwrap();
                        acc.info.code_hash = KECCAK_EMPTY;
                        acc.info.code = None;
                    }
                }
            }
        }
    *)
    Definition journal_revert (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ state; transient_storage; journal_entries; is_spurious_dragon_enabled ] =>
        ltac:(M.monadic
          (let state := M.alloc (| state |) in
          let transient_storage := M.alloc (| transient_storage |) in
          let journal_entries := M.alloc (| journal_entries |) in
          let is_spurious_dragon_enabled := M.alloc (| is_spurious_dragon_enabled |) in
          M.read (|
            M.use
              (M.match_operator (|
                M.alloc (|
                  M.call_closure (|
                    M.get_trait_method (|
                      "core::iter::traits::collect::IntoIterator",
                      Ty.apply
                        (Ty.path "core::iter::adapters::rev::Rev")
                        []
                        [
                          Ty.apply
                            (Ty.path "alloc::vec::into_iter::IntoIter")
                            []
                            [
                              Ty.path "revm::journaled_state::JournalEntry";
                              Ty.path "alloc::alloc::Global"
                            ]
                        ],
                      [],
                      "into_iter",
                      []
                    |),
                    [
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::iter::traits::iterator::Iterator",
                          Ty.apply
                            (Ty.path "alloc::vec::into_iter::IntoIter")
                            []
                            [
                              Ty.path "revm::journaled_state::JournalEntry";
                              Ty.path "alloc::alloc::Global"
                            ],
                          [],
                          "rev",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::iter::traits::collect::IntoIterator",
                              Ty.apply
                                (Ty.path "alloc::vec::Vec")
                                []
                                [
                                  Ty.path "revm::journaled_state::JournalEntry";
                                  Ty.path "alloc::alloc::Global"
                                ],
                              [],
                              "into_iter",
                              []
                            |),
                            [ M.read (| journal_entries |) ]
                          |)
                        ]
                      |)
                    ]
                  |)
                |),
                [
                  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::iter::adapters::rev::Rev")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "alloc::vec::into_iter::IntoIter")
                                          []
                                          [
                                            Ty.path "revm::journaled_state::JournalEntry";
                                            Ty.path "alloc::alloc::Global"
                                          ]
                                      ],
                                    [],
                                    "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 entry := M.copy (| γ0_0 |) in
                                    M.match_operator (|
                                      entry,
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::AccountLoaded",
                                                "address"
                                              |) in
                                            let address := M.copy (| γ0_0 |) in
                                            let~ _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path
                                                        "std::collections::hash::map::HashMap")
                                                      []
                                                      [
                                                        Ty.path
                                                          "alloy_primitives::bits::address::Address";
                                                        Ty.path "revm_primitives::state::Account";
                                                        Ty.path "std::hash::random::RandomState"
                                                      ],
                                                    "remove",
                                                    [
                                                      Ty.path
                                                        "alloy_primitives::bits::address::Address"
                                                    ]
                                                  |),
                                                  [ M.read (| state |); address ]
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::AccountTouched",
                                                "address"
                                              |) in
                                            let address := M.copy (| γ0_0 |) in
                                            let~ _ :=
                                              M.match_operator (|
                                                M.alloc (| Value.Tuple [] |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ :=
                                                        M.use
                                                          (M.alloc (|
                                                            LogicalOp.and (|
                                                              M.read (|
                                                                is_spurious_dragon_enabled
                                                              |),
                                                              ltac:(M.monadic
                                                                (M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::cmp::PartialEq",
                                                                    Ty.path
                                                                      "alloy_primitives::bits::address::Address",
                                                                    [
                                                                      Ty.path
                                                                        "alloy_primitives::bits::address::Address"
                                                                    ],
                                                                    "eq",
                                                                    []
                                                                  |),
                                                                  [
                                                                    address;
                                                                    M.get_constant (|
                                                                      "revm_primitives::constants::PRECOMPILE3"
                                                                    |)
                                                                  ]
                                                                |)))
                                                            |)
                                                          |)) in
                                                      let _ :=
                                                        M.is_constant_or_break_match (|
                                                          M.read (| γ |),
                                                          Value.Bool true
                                                        |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (| M.continue (||) |)
                                                        |)
                                                      |)));
                                                  fun γ =>
                                                    ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                                ]
                                              |) in
                                            let~ _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path "revm_primitives::state::Account",
                                                    "unmark_touch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path "core::option::Option")
                                                          []
                                                          [
                                                            Ty.apply
                                                              (Ty.path "&mut")
                                                              []
                                                              [
                                                                Ty.path
                                                                  "revm_primitives::state::Account"
                                                              ]
                                                          ],
                                                        "unwrap",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.apply
                                                              (Ty.path
                                                                "std::collections::hash::map::HashMap")
                                                              []
                                                              [
                                                                Ty.path
                                                                  "alloy_primitives::bits::address::Address";
                                                                Ty.path
                                                                  "revm_primitives::state::Account";
                                                                Ty.path
                                                                  "std::hash::random::RandomState"
                                                              ],
                                                            "get_mut",
                                                            [
                                                              Ty.path
                                                                "alloy_primitives::bits::address::Address"
                                                            ]
                                                          |),
                                                          [ M.read (| state |); address ]
                                                        |)
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::AccountDestroyed",
                                                "address"
                                              |) in
                                            let γ0_1 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::AccountDestroyed",
                                                "target"
                                              |) in
                                            let γ0_2 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::AccountDestroyed",
                                                "was_destroyed"
                                              |) in
                                            let γ0_3 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::AccountDestroyed",
                                                "had_balance"
                                              |) in
                                            let address := M.copy (| γ0_0 |) in
                                            let target := M.copy (| γ0_1 |) in
                                            let was_destroyed := M.copy (| γ0_2 |) in
                                            let had_balance := M.copy (| γ0_3 |) in
                                            let~ account :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "core::option::Option")
                                                      []
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&mut")
                                                          []
                                                          [
                                                            Ty.path
                                                              "revm_primitives::state::Account"
                                                          ]
                                                      ],
                                                    "unwrap",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "std::collections::hash::map::HashMap")
                                                          []
                                                          [
                                                            Ty.path
                                                              "alloy_primitives::bits::address::Address";
                                                            Ty.path
                                                              "revm_primitives::state::Account";
                                                            Ty.path "std::hash::random::RandomState"
                                                          ],
                                                        "get_mut",
                                                        [
                                                          Ty.path
                                                            "alloy_primitives::bits::address::Address"
                                                        ]
                                                      |),
                                                      [ M.read (| state |); address ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            let~ _ :=
                                              M.match_operator (|
                                                M.alloc (| Value.Tuple [] |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ := M.use was_destroyed 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.path
                                                                "revm_primitives::state::Account",
                                                              "mark_selfdestruct",
                                                              []
                                                            |),
                                                            [ M.read (| account |) ]
                                                          |)
                                                        |) in
                                                      M.alloc (| Value.Tuple [] |)));
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let~ _ :=
                                                        M.alloc (|
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.path
                                                                "revm_primitives::state::Account",
                                                              "unmark_selfdestruct",
                                                              []
                                                            |),
                                                            [ M.read (| account |) ]
                                                          |)
                                                        |) in
                                                      M.alloc (| Value.Tuple [] |)))
                                                ]
                                              |) in
                                            let~ _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::arith::AddAssign",
                                                    Ty.apply
                                                      (Ty.path "ruint::Uint")
                                                      [
                                                        Value.Integer IntegerKind.Usize 256;
                                                        Value.Integer IntegerKind.Usize 4
                                                      ]
                                                      [],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "ruint::Uint")
                                                        [
                                                          Value.Integer IntegerKind.Usize 256;
                                                          Value.Integer IntegerKind.Usize 4
                                                        ]
                                                        []
                                                    ],
                                                    "add_assign",
                                                    []
                                                  |),
                                                  [
                                                    M.SubPointer.get_struct_record_field (|
                                                      M.SubPointer.get_struct_record_field (|
                                                        M.read (| account |),
                                                        "revm_primitives::state::Account",
                                                        "info"
                                                      |),
                                                      "revm_primitives::state::AccountInfo",
                                                      "balance"
                                                    |);
                                                    M.read (| had_balance |)
                                                  ]
                                                |)
                                              |) in
                                            M.match_operator (|
                                              M.alloc (| Value.Tuple [] |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ :=
                                                      M.use
                                                        (M.alloc (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::cmp::PartialEq",
                                                              Ty.path
                                                                "alloy_primitives::bits::address::Address",
                                                              [
                                                                Ty.path
                                                                  "alloy_primitives::bits::address::Address"
                                                              ],
                                                              "ne",
                                                              []
                                                            |),
                                                            [ address; target ]
                                                          |)
                                                        |)) in
                                                    let _ :=
                                                      M.is_constant_or_break_match (|
                                                        M.read (| γ |),
                                                        Value.Bool true
                                                      |) in
                                                    let~ target :=
                                                      M.alloc (|
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.apply
                                                              (Ty.path "core::option::Option")
                                                              []
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "&mut")
                                                                  []
                                                                  [
                                                                    Ty.path
                                                                      "revm_primitives::state::Account"
                                                                  ]
                                                              ],
                                                            "unwrap",
                                                            []
                                                          |),
                                                          [
                                                            M.call_closure (|
                                                              M.get_associated_function (|
                                                                Ty.apply
                                                                  (Ty.path
                                                                    "std::collections::hash::map::HashMap")
                                                                  []
                                                                  [
                                                                    Ty.path
                                                                      "alloy_primitives::bits::address::Address";
                                                                    Ty.path
                                                                      "revm_primitives::state::Account";
                                                                    Ty.path
                                                                      "std::hash::random::RandomState"
                                                                  ],
                                                                "get_mut",
                                                                [
                                                                  Ty.path
                                                                    "alloy_primitives::bits::address::Address"
                                                                ]
                                                              |),
                                                              [ M.read (| state |); target ]
                                                            |)
                                                          ]
                                                        |)
                                                      |) in
                                                    let~ _ :=
                                                      M.alloc (|
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::ops::arith::SubAssign",
                                                            Ty.apply
                                                              (Ty.path "ruint::Uint")
                                                              [
                                                                Value.Integer IntegerKind.Usize 256;
                                                                Value.Integer IntegerKind.Usize 4
                                                              ]
                                                              [],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "ruint::Uint")
                                                                [
                                                                  Value.Integer
                                                                    IntegerKind.Usize
                                                                    256;
                                                                  Value.Integer IntegerKind.Usize 4
                                                                ]
                                                                []
                                                            ],
                                                            "sub_assign",
                                                            []
                                                          |),
                                                          [
                                                            M.SubPointer.get_struct_record_field (|
                                                              M.SubPointer.get_struct_record_field (|
                                                                M.read (| target |),
                                                                "revm_primitives::state::Account",
                                                                "info"
                                                              |),
                                                              "revm_primitives::state::AccountInfo",
                                                              "balance"
                                                            |);
                                                            M.read (| had_balance |)
                                                          ]
                                                        |)
                                                      |) in
                                                    M.alloc (| Value.Tuple [] |)));
                                                fun γ =>
                                                  ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                              ]
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::BalanceTransfer",
                                                "from"
                                              |) in
                                            let γ0_1 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::BalanceTransfer",
                                                "to"
                                              |) in
                                            let γ0_2 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::BalanceTransfer",
                                                "balance"
                                              |) in
                                            let from := M.copy (| γ0_0 |) in
                                            let to := M.copy (| γ0_1 |) in
                                            let balance := M.copy (| γ0_2 |) in
                                            let~ from :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "core::option::Option")
                                                      []
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&mut")
                                                          []
                                                          [
                                                            Ty.path
                                                              "revm_primitives::state::Account"
                                                          ]
                                                      ],
                                                    "unwrap",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "std::collections::hash::map::HashMap")
                                                          []
                                                          [
                                                            Ty.path
                                                              "alloy_primitives::bits::address::Address";
                                                            Ty.path
                                                              "revm_primitives::state::Account";
                                                            Ty.path "std::hash::random::RandomState"
                                                          ],
                                                        "get_mut",
                                                        [
                                                          Ty.path
                                                            "alloy_primitives::bits::address::Address"
                                                        ]
                                                      |),
                                                      [ M.read (| state |); from ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            let~ _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::arith::AddAssign",
                                                    Ty.apply
                                                      (Ty.path "ruint::Uint")
                                                      [
                                                        Value.Integer IntegerKind.Usize 256;
                                                        Value.Integer IntegerKind.Usize 4
                                                      ]
                                                      [],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "ruint::Uint")
                                                        [
                                                          Value.Integer IntegerKind.Usize 256;
                                                          Value.Integer IntegerKind.Usize 4
                                                        ]
                                                        []
                                                    ],
                                                    "add_assign",
                                                    []
                                                  |),
                                                  [
                                                    M.SubPointer.get_struct_record_field (|
                                                      M.SubPointer.get_struct_record_field (|
                                                        M.read (| from |),
                                                        "revm_primitives::state::Account",
                                                        "info"
                                                      |),
                                                      "revm_primitives::state::AccountInfo",
                                                      "balance"
                                                    |);
                                                    M.read (| balance |)
                                                  ]
                                                |)
                                              |) in
                                            let~ to :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "core::option::Option")
                                                      []
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&mut")
                                                          []
                                                          [
                                                            Ty.path
                                                              "revm_primitives::state::Account"
                                                          ]
                                                      ],
                                                    "unwrap",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "std::collections::hash::map::HashMap")
                                                          []
                                                          [
                                                            Ty.path
                                                              "alloy_primitives::bits::address::Address";
                                                            Ty.path
                                                              "revm_primitives::state::Account";
                                                            Ty.path "std::hash::random::RandomState"
                                                          ],
                                                        "get_mut",
                                                        [
                                                          Ty.path
                                                            "alloy_primitives::bits::address::Address"
                                                        ]
                                                      |),
                                                      [ M.read (| state |); to ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            let~ _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::arith::SubAssign",
                                                    Ty.apply
                                                      (Ty.path "ruint::Uint")
                                                      [
                                                        Value.Integer IntegerKind.Usize 256;
                                                        Value.Integer IntegerKind.Usize 4
                                                      ]
                                                      [],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "ruint::Uint")
                                                        [
                                                          Value.Integer IntegerKind.Usize 256;
                                                          Value.Integer IntegerKind.Usize 4
                                                        ]
                                                        []
                                                    ],
                                                    "sub_assign",
                                                    []
                                                  |),
                                                  [
                                                    M.SubPointer.get_struct_record_field (|
                                                      M.SubPointer.get_struct_record_field (|
                                                        M.read (| to |),
                                                        "revm_primitives::state::Account",
                                                        "info"
                                                      |),
                                                      "revm_primitives::state::AccountInfo",
                                                      "balance"
                                                    |);
                                                    M.read (| balance |)
                                                  ]
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::NonceChange",
                                                "address"
                                              |) in
                                            let address := M.copy (| γ0_0 |) in
                                            let~ _ :=
                                              let β :=
                                                M.SubPointer.get_struct_record_field (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path "core::option::Option")
                                                          []
                                                          [
                                                            Ty.apply
                                                              (Ty.path "&mut")
                                                              []
                                                              [
                                                                Ty.path
                                                                  "revm_primitives::state::Account"
                                                              ]
                                                          ],
                                                        "unwrap",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.apply
                                                              (Ty.path
                                                                "std::collections::hash::map::HashMap")
                                                              []
                                                              [
                                                                Ty.path
                                                                  "alloy_primitives::bits::address::Address";
                                                                Ty.path
                                                                  "revm_primitives::state::Account";
                                                                Ty.path
                                                                  "std::hash::random::RandomState"
                                                              ],
                                                            "get_mut",
                                                            [
                                                              Ty.path
                                                                "alloy_primitives::bits::address::Address"
                                                            ]
                                                          |),
                                                          [ M.read (| state |); address ]
                                                        |)
                                                      ]
                                                    |),
                                                    "revm_primitives::state::Account",
                                                    "info"
                                                  |),
                                                  "revm_primitives::state::AccountInfo",
                                                  "nonce"
                                                |) in
                                              M.write (|
                                                β,
                                                BinOp.Wrap.sub (|
                                                  M.read (| β |),
                                                  Value.Integer IntegerKind.U64 1
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::AccountCreated",
                                                "address"
                                              |) in
                                            let address := M.copy (| γ0_0 |) in
                                            let~ account :=
                                              M.alloc (|
                                                M.alloc (|
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        []
                                                        [
                                                          Ty.apply
                                                            (Ty.path "&mut")
                                                            []
                                                            [
                                                              Ty.path
                                                                "revm_primitives::state::Account"
                                                            ]
                                                        ],
                                                      "unwrap",
                                                      []
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.apply
                                                            (Ty.path
                                                              "std::collections::hash::map::HashMap")
                                                            []
                                                            [
                                                              Ty.path
                                                                "alloy_primitives::bits::address::Address";
                                                              Ty.path
                                                                "revm_primitives::state::Account";
                                                              Ty.path
                                                                "std::hash::random::RandomState"
                                                            ],
                                                          "get_mut",
                                                          [
                                                            Ty.path
                                                              "alloy_primitives::bits::address::Address"
                                                          ]
                                                        |),
                                                        [ M.read (| state |); address ]
                                                      |)
                                                    ]
                                                  |)
                                                |)
                                              |) in
                                            let~ _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path "revm_primitives::state::Account",
                                                    "unmark_created",
                                                    []
                                                  |),
                                                  [ M.read (| M.read (| account |) |) ]
                                                |)
                                              |) in
                                            let~ _ :=
                                              M.write (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| M.read (| account |) |),
                                                    "revm_primitives::state::Account",
                                                    "info"
                                                  |),
                                                  "revm_primitives::state::AccountInfo",
                                                  "nonce"
                                                |),
                                                Value.Integer IntegerKind.U64 0
                                              |) in
                                            M.alloc (| Value.Tuple [] |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::StorageChange",
                                                "address"
                                              |) in
                                            let γ0_1 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::StorageChange",
                                                "key"
                                              |) in
                                            let γ0_2 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::StorageChange",
                                                "had_value"
                                              |) in
                                            let address := M.copy (| γ0_0 |) in
                                            let key := M.copy (| γ0_1 |) in
                                            let had_value := M.copy (| γ0_2 |) in
                                            let~ storage :=
                                              M.alloc (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        []
                                                        [
                                                          Ty.apply
                                                            (Ty.path "&mut")
                                                            []
                                                            [
                                                              Ty.path
                                                                "revm_primitives::state::Account"
                                                            ]
                                                        ],
                                                      "unwrap",
                                                      []
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.apply
                                                            (Ty.path
                                                              "std::collections::hash::map::HashMap")
                                                            []
                                                            [
                                                              Ty.path
                                                                "alloy_primitives::bits::address::Address";
                                                              Ty.path
                                                                "revm_primitives::state::Account";
                                                              Ty.path
                                                                "std::hash::random::RandomState"
                                                            ],
                                                          "get_mut",
                                                          [
                                                            Ty.path
                                                              "alloy_primitives::bits::address::Address"
                                                          ]
                                                        |),
                                                        [ M.read (| state |); address ]
                                                      |)
                                                    ]
                                                  |),
                                                  "revm_primitives::state::Account",
                                                  "storage"
                                                |)
                                              |) in
                                            M.match_operator (|
                                              M.alloc (| Value.Tuple [] |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ := had_value in
                                                    let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::option::Option::Some",
                                                        0
                                                      |) in
                                                    let had_value := M.copy (| γ0_0 |) in
                                                    let~ _ :=
                                                      M.write (|
                                                        M.SubPointer.get_struct_record_field (|
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.apply
                                                                (Ty.path "core::option::Option")
                                                                []
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "&mut")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "revm_primitives::state::StorageSlot"
                                                                    ]
                                                                ],
                                                              "unwrap",
                                                              []
                                                            |),
                                                            [
                                                              M.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.apply
                                                                    (Ty.path
                                                                      "std::collections::hash::map::HashMap")
                                                                    []
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path "ruint::Uint")
                                                                        [
                                                                          Value.Integer
                                                                            IntegerKind.Usize
                                                                            256;
                                                                          Value.Integer
                                                                            IntegerKind.Usize
                                                                            4
                                                                        ]
                                                                        [];
                                                                      Ty.path
                                                                        "revm_primitives::state::StorageSlot";
                                                                      Ty.path
                                                                        "std::hash::random::RandomState"
                                                                    ],
                                                                  "get_mut",
                                                                  [
                                                                    Ty.apply
                                                                      (Ty.path "ruint::Uint")
                                                                      [
                                                                        Value.Integer
                                                                          IntegerKind.Usize
                                                                          256;
                                                                        Value.Integer
                                                                          IntegerKind.Usize
                                                                          4
                                                                      ]
                                                                      []
                                                                  ]
                                                                |),
                                                                [ M.read (| storage |); key ]
                                                              |)
                                                            ]
                                                          |),
                                                          "revm_primitives::state::StorageSlot",
                                                          "present_value"
                                                        |),
                                                        M.read (| had_value |)
                                                      |) in
                                                    M.alloc (| Value.Tuple [] |)));
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let~ _ :=
                                                      M.alloc (|
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.apply
                                                              (Ty.path
                                                                "std::collections::hash::map::HashMap")
                                                              []
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "ruint::Uint")
                                                                  [
                                                                    Value.Integer
                                                                      IntegerKind.Usize
                                                                      256;
                                                                    Value.Integer
                                                                      IntegerKind.Usize
                                                                      4
                                                                  ]
                                                                  [];
                                                                Ty.path
                                                                  "revm_primitives::state::StorageSlot";
                                                                Ty.path
                                                                  "std::hash::random::RandomState"
                                                              ],
                                                            "remove",
                                                            [
                                                              Ty.apply
                                                                (Ty.path "ruint::Uint")
                                                                [
                                                                  Value.Integer
                                                                    IntegerKind.Usize
                                                                    256;
                                                                  Value.Integer IntegerKind.Usize 4
                                                                ]
                                                                []
                                                            ]
                                                          |),
                                                          [ M.read (| storage |); key ]
                                                        |)
                                                      |) in
                                                    M.alloc (| Value.Tuple [] |)))
                                              ]
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::TransientStorageChange",
                                                "address"
                                              |) in
                                            let γ0_1 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::TransientStorageChange",
                                                "key"
                                              |) in
                                            let γ0_2 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::TransientStorageChange",
                                                "had_value"
                                              |) in
                                            let address := M.copy (| γ0_0 |) in
                                            let key := M.copy (| γ0_1 |) in
                                            let had_value := M.copy (| γ0_2 |) in
                                            let~ tkey :=
                                              M.alloc (|
                                                Value.Tuple
                                                  [ M.read (| address |); M.read (| key |) ]
                                              |) in
                                            M.match_operator (|
                                              M.alloc (| Value.Tuple [] |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ :=
                                                      M.use
                                                        (M.alloc (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::cmp::PartialEq",
                                                              Ty.apply
                                                                (Ty.path "ruint::Uint")
                                                                [
                                                                  Value.Integer
                                                                    IntegerKind.Usize
                                                                    256;
                                                                  Value.Integer IntegerKind.Usize 4
                                                                ]
                                                                [],
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "ruint::Uint")
                                                                  [
                                                                    Value.Integer
                                                                      IntegerKind.Usize
                                                                      256;
                                                                    Value.Integer
                                                                      IntegerKind.Usize
                                                                      4
                                                                  ]
                                                                  []
                                                              ],
                                                              "eq",
                                                              []
                                                            |),
                                                            [
                                                              had_value;
                                                              M.get_constant (| "ruint::ZERO" |)
                                                            ]
                                                          |)
                                                        |)) 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
                                                                "std::collections::hash::map::HashMap")
                                                              []
                                                              [
                                                                Ty.tuple
                                                                  [
                                                                    Ty.path
                                                                      "alloy_primitives::bits::address::Address";
                                                                    Ty.apply
                                                                      (Ty.path "ruint::Uint")
                                                                      [
                                                                        Value.Integer
                                                                          IntegerKind.Usize
                                                                          256;
                                                                        Value.Integer
                                                                          IntegerKind.Usize
                                                                          4
                                                                      ]
                                                                      []
                                                                  ];
                                                                Ty.apply
                                                                  (Ty.path "ruint::Uint")
                                                                  [
                                                                    Value.Integer
                                                                      IntegerKind.Usize
                                                                      256;
                                                                    Value.Integer
                                                                      IntegerKind.Usize
                                                                      4
                                                                  ]
                                                                  [];
                                                                Ty.path
                                                                  "std::hash::random::RandomState"
                                                              ],
                                                            "remove",
                                                            [
                                                              Ty.tuple
                                                                [
                                                                  Ty.path
                                                                    "alloy_primitives::bits::address::Address";
                                                                  Ty.apply
                                                                    (Ty.path "ruint::Uint")
                                                                    [
                                                                      Value.Integer
                                                                        IntegerKind.Usize
                                                                        256;
                                                                      Value.Integer
                                                                        IntegerKind.Usize
                                                                        4
                                                                    ]
                                                                    []
                                                                ]
                                                            ]
                                                          |),
                                                          [ M.read (| transient_storage |); tkey ]
                                                        |)
                                                      |) in
                                                    M.alloc (| Value.Tuple [] |)));
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let~ _ :=
                                                      M.alloc (|
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.apply
                                                              (Ty.path
                                                                "std::collections::hash::map::HashMap")
                                                              []
                                                              [
                                                                Ty.tuple
                                                                  [
                                                                    Ty.path
                                                                      "alloy_primitives::bits::address::Address";
                                                                    Ty.apply
                                                                      (Ty.path "ruint::Uint")
                                                                      [
                                                                        Value.Integer
                                                                          IntegerKind.Usize
                                                                          256;
                                                                        Value.Integer
                                                                          IntegerKind.Usize
                                                                          4
                                                                      ]
                                                                      []
                                                                  ];
                                                                Ty.apply
                                                                  (Ty.path "ruint::Uint")
                                                                  [
                                                                    Value.Integer
                                                                      IntegerKind.Usize
                                                                      256;
                                                                    Value.Integer
                                                                      IntegerKind.Usize
                                                                      4
                                                                  ]
                                                                  [];
                                                                Ty.path
                                                                  "std::hash::random::RandomState"
                                                              ],
                                                            "insert",
                                                            []
                                                          |),
                                                          [
                                                            M.read (| transient_storage |);
                                                            M.read (| tkey |);
                                                            M.read (| had_value |)
                                                          ]
                                                        |)
                                                      |) in
                                                    M.alloc (| Value.Tuple [] |)))
                                              ]
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "revm::journaled_state::JournalEntry::CodeChange",
                                                "address"
                                              |) in
                                            let address := M.copy (| γ0_0 |) in
                                            let~ acc :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "core::option::Option")
                                                      []
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&mut")
                                                          []
                                                          [
                                                            Ty.path
                                                              "revm_primitives::state::Account"
                                                          ]
                                                      ],
                                                    "unwrap",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "std::collections::hash::map::HashMap")
                                                          []
                                                          [
                                                            Ty.path
                                                              "alloy_primitives::bits::address::Address";
                                                            Ty.path
                                                              "revm_primitives::state::Account";
                                                            Ty.path "std::hash::random::RandomState"
                                                          ],
                                                        "get_mut",
                                                        [
                                                          Ty.path
                                                            "alloy_primitives::bits::address::Address"
                                                        ]
                                                      |),
                                                      [ M.read (| state |); address ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            let~ _ :=
                                              M.write (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| acc |),
                                                    "revm_primitives::state::Account",
                                                    "info"
                                                  |),
                                                  "revm_primitives::state::AccountInfo",
                                                  "code_hash"
                                                |),
                                                M.read (|
                                                  M.get_constant (|
                                                    "revm_primitives::utilities::KECCAK_EMPTY"
                                                  |)
                                                |)
                                              |) in
                                            let~ _ :=
                                              M.write (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| acc |),
                                                    "revm_primitives::state::Account",
                                                    "info"
                                                  |),
                                                  "revm_primitives::state::AccountInfo",
                                                  "code"
                                                |),
                                                Value.StructTuple "core::option::Option::None" []
                                              |) in
                                            M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |)))
                              ]
                            |) in
                          M.alloc (| Value.Tuple [] |)))
                      |)))
                ]
              |))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_journal_revert :
      M.IsAssociatedFunction Self "journal_revert" journal_revert.
    
    (*
        pub fn checkpoint(&mut self) -> JournalCheckpoint {
            let checkpoint = JournalCheckpoint {
                log_i: self.logs.len(),
                journal_i: self.journal.len(),
            };
            self.depth += 1;
            self.journal.push(Default::default());
            checkpoint
        }
    *)
    Definition checkpoint (ε : 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~ checkpoint :=
              M.alloc (|
                Value.StructRecord
                  "revm::journaled_state::JournalCheckpoint"
                  [
                    ("log_i",
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "alloc::vec::Vec")
                            []
                            [
                              Ty.apply
                                (Ty.path "alloy_primitives::log::Log")
                                []
                                [ Ty.path "alloy_primitives::log::LogData" ];
                              Ty.path "alloc::alloc::Global"
                            ],
                          "len",
                          []
                        |),
                        [
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "revm::journaled_state::JournaledState",
                            "logs"
                          |)
                        ]
                      |));
                    ("journal_i",
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "alloc::vec::Vec")
                            []
                            [
                              Ty.apply
                                (Ty.path "alloc::vec::Vec")
                                []
                                [
                                  Ty.path "revm::journaled_state::JournalEntry";
                                  Ty.path "alloc::alloc::Global"
                                ];
                              Ty.path "alloc::alloc::Global"
                            ],
                          "len",
                          []
                        |),
                        [
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "revm::journaled_state::JournaledState",
                            "journal"
                          |)
                        ]
                      |))
                  ]
              |) in
            let~ _ :=
              let β :=
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "revm::journaled_state::JournaledState",
                  "depth"
                |) in
              M.write (|
                β,
                BinOp.Wrap.add (| M.read (| β |), Value.Integer IntegerKind.Usize 1 |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [
                            Ty.path "revm::journaled_state::JournalEntry";
                            Ty.path "alloc::alloc::Global"
                          ];
                        Ty.path "alloc::alloc::Global"
                      ],
                    "push",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "journal"
                    |);
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::default::Default",
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [
                            Ty.path "revm::journaled_state::JournalEntry";
                            Ty.path "alloc::alloc::Global"
                          ],
                        [],
                        "default",
                        []
                      |),
                      []
                    |)
                  ]
                |)
              |) in
            checkpoint
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_checkpoint : M.IsAssociatedFunction Self "checkpoint" checkpoint.
    
    (*
        pub fn checkpoint_commit(&mut self) {
            self.depth -= 1;
        }
    *)
    Definition checkpoint_commit (ε : 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~ _ :=
              let β :=
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "revm::journaled_state::JournaledState",
                  "depth"
                |) in
              M.write (|
                β,
                BinOp.Wrap.sub (| M.read (| β |), Value.Integer IntegerKind.Usize 1 |)
              |) in
            M.alloc (| Value.Tuple [] |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_checkpoint_commit :
      M.IsAssociatedFunction Self "checkpoint_commit" checkpoint_commit.
    
    (*
        pub fn checkpoint_revert(&mut self, checkpoint: JournalCheckpoint) {
            let is_spurious_dragon_enabled = SpecId::enabled(self.spec, SPURIOUS_DRAGON);
            let state = &mut self.state;
            let transient_storage = &mut self.transient_storage;
            self.depth -= 1;
            // iterate over last N journals sets and revert our global state
            let leng = self.journal.len();
            self.journal
                .iter_mut()
                .rev()
                .take(leng - checkpoint.journal_i)
                .for_each(|cs| {
                    Self::journal_revert(
                        state,
                        transient_storage,
                        mem::take(cs),
                        is_spurious_dragon_enabled,
                    )
                });
    
            self.logs.truncate(checkpoint.log_i);
            self.journal.truncate(checkpoint.journal_i);
        }
    *)
    Definition checkpoint_revert (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; checkpoint ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let checkpoint := M.alloc (| checkpoint |) in
          M.read (|
            let~ is_spurious_dragon_enabled :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "revm_primitives::specification::SpecId",
                    "enabled",
                    []
                  |),
                  [
                    M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "revm::journaled_state::JournaledState",
                        "spec"
                      |)
                    |);
                    Value.StructTuple "revm_primitives::specification::SpecId::SPURIOUS_DRAGON" []
                  ]
                |)
              |) in
            let~ state :=
              M.alloc (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "revm::journaled_state::JournaledState",
                  "state"
                |)
              |) in
            let~ transient_storage :=
              M.alloc (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "revm::journaled_state::JournaledState",
                  "transient_storage"
                |)
              |) in
            let~ _ :=
              let β :=
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "revm::journaled_state::JournaledState",
                  "depth"
                |) in
              M.write (|
                β,
                BinOp.Wrap.sub (| M.read (| β |), Value.Integer IntegerKind.Usize 1 |)
              |) in
            let~ leng :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [
                            Ty.path "revm::journaled_state::JournalEntry";
                            Ty.path "alloc::alloc::Global"
                          ];
                        Ty.path "alloc::alloc::Global"
                      ],
                    "len",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "journal"
                    |)
                  ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_trait_method (|
                    "core::iter::traits::iterator::Iterator",
                    Ty.apply
                      (Ty.path "core::iter::adapters::take::Take")
                      []
                      [
                        Ty.apply
                          (Ty.path "core::iter::adapters::rev::Rev")
                          []
                          [
                            Ty.apply
                              (Ty.path "core::slice::iter::IterMut")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "revm::journaled_state::JournalEntry";
                                    Ty.path "alloc::alloc::Global"
                                  ]
                              ]
                          ]
                      ],
                    [],
                    "for_each",
                    [
                      Ty.function
                        [
                          Ty.tuple
                            [
                              Ty.apply
                                (Ty.path "&mut")
                                []
                                [
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    []
                                    [
                                      Ty.path "revm::journaled_state::JournalEntry";
                                      Ty.path "alloc::alloc::Global"
                                    ]
                                ]
                            ]
                        ]
                        (Ty.tuple [])
                    ]
                  |),
                  [
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::traits::iterator::Iterator",
                        Ty.apply
                          (Ty.path "core::iter::adapters::rev::Rev")
                          []
                          [
                            Ty.apply
                              (Ty.path "core::slice::iter::IterMut")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "revm::journaled_state::JournalEntry";
                                    Ty.path "alloc::alloc::Global"
                                  ]
                              ]
                          ],
                        [],
                        "take",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::traits::iterator::Iterator",
                            Ty.apply
                              (Ty.path "core::slice::iter::IterMut")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "revm::journaled_state::JournalEntry";
                                    Ty.path "alloc::alloc::Global"
                                  ]
                              ],
                            [],
                            "rev",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "slice")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ]
                                  ],
                                "iter_mut",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::deref::DerefMut",
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.path "revm::journaled_state::JournalEntry";
                                            Ty.path "alloc::alloc::Global"
                                          ];
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    [],
                                    "deref_mut",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "revm::journaled_state::JournaledState",
                                      "journal"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          ]
                        |);
                        BinOp.Wrap.sub (|
                          M.read (| leng |),
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              checkpoint,
                              "revm::journaled_state::JournalCheckpoint",
                              "journal_i"
                            |)
                          |)
                        |)
                      ]
                    |);
                    M.closure
                      (fun γ =>
                        ltac:(M.monadic
                          match γ with
                          | [ α0 ] =>
                            ltac:(M.monadic
                              (M.match_operator (|
                                M.alloc (| α0 |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let cs := M.copy (| γ |) in
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "revm::journaled_state::JournaledState",
                                          "journal_revert",
                                          []
                                        |),
                                        [
                                          M.read (| state |);
                                          M.read (| transient_storage |);
                                          M.call_closure (|
                                            M.get_function (|
                                              "core::mem::take",
                                              [
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path "revm::journaled_state::JournalEntry";
                                                    Ty.path "alloc::alloc::Global"
                                                  ]
                                              ]
                                            |),
                                            [ M.read (| cs |) ]
                                          |);
                                          M.read (| is_spurious_dragon_enabled |)
                                        ]
                                      |)))
                                ]
                              |)))
                          | _ => M.impossible "wrong number of arguments"
                          end))
                  ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [
                        Ty.apply
                          (Ty.path "alloy_primitives::log::Log")
                          []
                          [ Ty.path "alloy_primitives::log::LogData" ];
                        Ty.path "alloc::alloc::Global"
                      ],
                    "truncate",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "logs"
                    |);
                    M.read (|
                      M.SubPointer.get_struct_record_field (|
                        checkpoint,
                        "revm::journaled_state::JournalCheckpoint",
                        "log_i"
                      |)
                    |)
                  ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [
                            Ty.path "revm::journaled_state::JournalEntry";
                            Ty.path "alloc::alloc::Global"
                          ];
                        Ty.path "alloc::alloc::Global"
                      ],
                    "truncate",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "journal"
                    |);
                    M.read (|
                      M.SubPointer.get_struct_record_field (|
                        checkpoint,
                        "revm::journaled_state::JournalCheckpoint",
                        "journal_i"
                      |)
                    |)
                  ]
                |)
              |) in
            M.alloc (| Value.Tuple [] |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_checkpoint_revert :
      M.IsAssociatedFunction Self "checkpoint_revert" checkpoint_revert.
    
    (*
        pub fn selfdestruct<DB: Database>(
            &mut self,
            address: Address,
            target: Address,
            db: &mut DB,
        ) -> Result<SelfDestructResult, EVMError<DB::Error>> {
            let load_result = self.load_account_exist(target, db)?;
    
            if address != target {
                // Both accounts are loaded before this point, `address` as we execute its contract.
                // and `target` at the beginning of the function.
                let acc_balance = self.state.get_mut(&address).unwrap().info.balance;
    
                let target_account = self.state.get_mut(&target).unwrap();
                Self::touch_account(self.journal.last_mut().unwrap(), &target, target_account);
                target_account.info.balance += acc_balance;
            }
    
            let acc = self.state.get_mut(&address).unwrap();
            let balance = acc.info.balance;
            let previously_destroyed = acc.is_selfdestructed();
            let is_cancun_enabled = SpecId::enabled(self.spec, CANCUN);
    
            // EIP-6780 (Cancun hard-fork): selfdestruct only if contract is created in the same tx
            let journal_entry = if acc.is_created() || !is_cancun_enabled {
                acc.mark_selfdestruct();
                acc.info.balance = U256::ZERO;
                Some(JournalEntry::AccountDestroyed {
                    address,
                    target,
                    was_destroyed: previously_destroyed,
                    had_balance: balance,
                })
            } else if address != target {
                acc.info.balance = U256::ZERO;
                Some(JournalEntry::BalanceTransfer {
                    from: address,
                    to: target,
                    balance,
                })
            } else {
                // State is not changed:
                // * if we are after Cancun upgrade and
                // * Selfdestruct account that is created in the same transaction and
                // * Specify the target is same as selfdestructed account. The balance stays unchanged.
                None
            };
    
            if let Some(entry) = journal_entry {
                self.journal.last_mut().unwrap().push(entry);
            };
    
            Ok(SelfDestructResult {
                had_value: balance != U256::ZERO,
                is_cold: load_result.is_cold,
                target_exists: !load_result.is_empty,
                previously_destroyed,
            })
        }
    *)
    Definition selfdestruct (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ DB ], [ self; address; target; db ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          let target := M.alloc (| target |) in
          let db := M.alloc (| db |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ load_result :=
                  M.copy (|
                    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.path "revm_interpreter::host::LoadAccountResult";
                                Ty.apply
                                  (Ty.path "revm_primitives::result::EVMError")
                                  []
                                  [ Ty.associated ]
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path "revm::journaled_state::JournaledState",
                                "load_account_exist",
                                [ DB ]
                              |),
                              [ M.read (| self |); M.read (| target |); M.read (| db |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        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.path "revm_interpreter::host::SelfDestructResult";
                                            Ty.apply
                                              (Ty.path "revm_primitives::result::EVMError")
                                              []
                                              [ Ty.associated ]
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            []
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.apply
                                                (Ty.path "revm_primitives::result::EVMError")
                                                []
                                                [ Ty.associated ]
                                            ]
                                        ],
                                        "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))
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::cmp::PartialEq",
                                    Ty.path "alloy_primitives::bits::address::Address",
                                    [ Ty.path "alloy_primitives::bits::address::Address" ],
                                    "ne",
                                    []
                                  |),
                                  [ address; target ]
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let~ acc_balance :=
                            M.copy (|
                              M.SubPointer.get_struct_record_field (|
                                M.SubPointer.get_struct_record_field (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "core::option::Option")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "&mut")
                                            []
                                            [ Ty.path "revm_primitives::state::Account" ]
                                        ],
                                      "unwrap",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "std::collections::hash::map::HashMap")
                                            []
                                            [
                                              Ty.path "alloy_primitives::bits::address::Address";
                                              Ty.path "revm_primitives::state::Account";
                                              Ty.path "std::hash::random::RandomState"
                                            ],
                                          "get_mut",
                                          [ Ty.path "alloy_primitives::bits::address::Address" ]
                                        |),
                                        [
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| self |),
                                            "revm::journaled_state::JournaledState",
                                            "state"
                                          |);
                                          address
                                        ]
                                      |)
                                    ]
                                  |),
                                  "revm_primitives::state::Account",
                                  "info"
                                |),
                                "revm_primitives::state::AccountInfo",
                                "balance"
                              |)
                            |) in
                          let~ target_account :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "core::option::Option")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "&mut")
                                        []
                                        [ Ty.path "revm_primitives::state::Account" ]
                                    ],
                                  "unwrap",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "std::collections::hash::map::HashMap")
                                        []
                                        [
                                          Ty.path "alloy_primitives::bits::address::Address";
                                          Ty.path "revm_primitives::state::Account";
                                          Ty.path "std::hash::random::RandomState"
                                        ],
                                      "get_mut",
                                      [ Ty.path "alloy_primitives::bits::address::Address" ]
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "revm::journaled_state::JournaledState",
                                        "state"
                                      |);
                                      target
                                    ]
                                  |)
                                ]
                              |)
                            |) in
                          let~ _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.path "revm::journaled_state::JournaledState",
                                  "touch_account",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "core::option::Option")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "&mut")
                                            []
                                            [
                                              Ty.apply
                                                (Ty.path "alloc::vec::Vec")
                                                []
                                                [
                                                  Ty.path "revm::journaled_state::JournalEntry";
                                                  Ty.path "alloc::alloc::Global"
                                                ]
                                            ]
                                        ],
                                      "unwrap",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "slice")
                                            []
                                            [
                                              Ty.apply
                                                (Ty.path "alloc::vec::Vec")
                                                []
                                                [
                                                  Ty.path "revm::journaled_state::JournalEntry";
                                                  Ty.path "alloc::alloc::Global"
                                                ]
                                            ],
                                          "last_mut",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::deref::DerefMut",
                                              Ty.apply
                                                (Ty.path "alloc::vec::Vec")
                                                []
                                                [
                                                  Ty.apply
                                                    (Ty.path "alloc::vec::Vec")
                                                    []
                                                    [
                                                      Ty.path "revm::journaled_state::JournalEntry";
                                                      Ty.path "alloc::alloc::Global"
                                                    ];
                                                  Ty.path "alloc::alloc::Global"
                                                ],
                                              [],
                                              "deref_mut",
                                              []
                                            |),
                                            [
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| self |),
                                                "revm::journaled_state::JournaledState",
                                                "journal"
                                              |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    ]
                                  |);
                                  target;
                                  M.read (| target_account |)
                                ]
                              |)
                            |) in
                          let~ _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::ops::arith::AddAssign",
                                  Ty.apply
                                    (Ty.path "ruint::Uint")
                                    [
                                      Value.Integer IntegerKind.Usize 256;
                                      Value.Integer IntegerKind.Usize 4
                                    ]
                                    [],
                                  [
                                    Ty.apply
                                      (Ty.path "ruint::Uint")
                                      [
                                        Value.Integer IntegerKind.Usize 256;
                                        Value.Integer IntegerKind.Usize 4
                                      ]
                                      []
                                  ],
                                  "add_assign",
                                  []
                                |),
                                [
                                  M.SubPointer.get_struct_record_field (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| target_account |),
                                      "revm_primitives::state::Account",
                                      "info"
                                    |),
                                    "revm_primitives::state::AccountInfo",
                                    "balance"
                                  |);
                                  M.read (| acc_balance |)
                                ]
                              |)
                            |) in
                          M.alloc (| Value.Tuple [] |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let~ acc :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "core::option::Option")
                          []
                          [
                            Ty.apply
                              (Ty.path "&mut")
                              []
                              [ Ty.path "revm_primitives::state::Account" ]
                          ],
                        "unwrap",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "std::collections::hash::map::HashMap")
                              []
                              [
                                Ty.path "alloy_primitives::bits::address::Address";
                                Ty.path "revm_primitives::state::Account";
                                Ty.path "std::hash::random::RandomState"
                              ],
                            "get_mut",
                            [ Ty.path "alloy_primitives::bits::address::Address" ]
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm::journaled_state::JournaledState",
                              "state"
                            |);
                            address
                          ]
                        |)
                      ]
                    |)
                  |) in
                let~ balance :=
                  M.copy (|
                    M.SubPointer.get_struct_record_field (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| acc |),
                        "revm_primitives::state::Account",
                        "info"
                      |),
                      "revm_primitives::state::AccountInfo",
                      "balance"
                    |)
                  |) in
                let~ previously_destroyed :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "revm_primitives::state::Account",
                        "is_selfdestructed",
                        []
                      |),
                      [ M.read (| acc |) ]
                    |)
                  |) in
                let~ is_cancun_enabled :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "revm_primitives::specification::SpecId",
                        "enabled",
                        []
                      |),
                      [
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "revm::journaled_state::JournaledState",
                            "spec"
                          |)
                        |);
                        Value.StructTuple "revm_primitives::specification::SpecId::CANCUN" []
                      ]
                    |)
                  |) in
                let~ journal_entry :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  LogicalOp.or (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "revm_primitives::state::Account",
                                        "is_created",
                                        []
                                      |),
                                      [ M.read (| acc |) ]
                                    |),
                                    ltac:(M.monadic (UnOp.not (| M.read (| is_cancun_enabled |) |)))
                                  |)
                                |)) 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.path "revm_primitives::state::Account",
                                    "mark_selfdestruct",
                                    []
                                  |),
                                  [ M.read (| acc |) ]
                                |)
                              |) in
                            let~ _ :=
                              M.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| acc |),
                                    "revm_primitives::state::Account",
                                    "info"
                                  |),
                                  "revm_primitives::state::AccountInfo",
                                  "balance"
                                |),
                                M.read (| M.get_constant (| "ruint::ZERO" |) |)
                              |) in
                            M.alloc (|
                              Value.StructTuple
                                "core::option::Option::Some"
                                [
                                  Value.StructRecord
                                    "revm::journaled_state::JournalEntry::AccountDestroyed"
                                    [
                                      ("address", M.read (| address |));
                                      ("target", M.read (| target |));
                                      ("was_destroyed", M.read (| previously_destroyed |));
                                      ("had_balance", M.read (| balance |))
                                    ]
                                ]
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::cmp::PartialEq",
                                              Ty.path "alloy_primitives::bits::address::Address",
                                              [ Ty.path "alloy_primitives::bits::address::Address"
                                              ],
                                              "ne",
                                              []
                                            |),
                                            [ address; target ]
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    let~ _ :=
                                      M.write (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| acc |),
                                            "revm_primitives::state::Account",
                                            "info"
                                          |),
                                          "revm_primitives::state::AccountInfo",
                                          "balance"
                                        |),
                                        M.read (| M.get_constant (| "ruint::ZERO" |) |)
                                      |) in
                                    M.alloc (|
                                      Value.StructTuple
                                        "core::option::Option::Some"
                                        [
                                          Value.StructRecord
                                            "revm::journaled_state::JournalEntry::BalanceTransfer"
                                            [
                                              ("from", M.read (| address |));
                                              ("to", M.read (| target |));
                                              ("balance", M.read (| balance |))
                                            ]
                                        ]
                                    |)));
                                fun γ =>
                                  ltac:(M.monadic
                                    (M.alloc (|
                                      Value.StructTuple "core::option::Option::None" []
                                    |)))
                              ]
                            |)))
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ := journal_entry in
                          let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::option::Option::Some",
                              0
                            |) in
                          let entry := M.copy (| γ0_0 |) in
                          let~ _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    []
                                    [
                                      Ty.path "revm::journaled_state::JournalEntry";
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  "push",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "core::option::Option")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "&mut")
                                            []
                                            [
                                              Ty.apply
                                                (Ty.path "alloc::vec::Vec")
                                                []
                                                [
                                                  Ty.path "revm::journaled_state::JournalEntry";
                                                  Ty.path "alloc::alloc::Global"
                                                ]
                                            ]
                                        ],
                                      "unwrap",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "slice")
                                            []
                                            [
                                              Ty.apply
                                                (Ty.path "alloc::vec::Vec")
                                                []
                                                [
                                                  Ty.path "revm::journaled_state::JournalEntry";
                                                  Ty.path "alloc::alloc::Global"
                                                ]
                                            ],
                                          "last_mut",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::deref::DerefMut",
                                              Ty.apply
                                                (Ty.path "alloc::vec::Vec")
                                                []
                                                [
                                                  Ty.apply
                                                    (Ty.path "alloc::vec::Vec")
                                                    []
                                                    [
                                                      Ty.path "revm::journaled_state::JournalEntry";
                                                      Ty.path "alloc::alloc::Global"
                                                    ];
                                                  Ty.path "alloc::alloc::Global"
                                                ],
                                              [],
                                              "deref_mut",
                                              []
                                            |),
                                            [
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| self |),
                                                "revm::journaled_state::JournaledState",
                                                "journal"
                                              |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    ]
                                  |);
                                  M.read (| entry |)
                                ]
                              |)
                            |) in
                          M.alloc (| Value.Tuple [] |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                M.alloc (|
                  Value.StructTuple
                    "core::result::Result::Ok"
                    [
                      Value.StructRecord
                        "revm_interpreter::host::SelfDestructResult"
                        [
                          ("had_value",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::cmp::PartialEq",
                                Ty.apply
                                  (Ty.path "ruint::Uint")
                                  [
                                    Value.Integer IntegerKind.Usize 256;
                                    Value.Integer IntegerKind.Usize 4
                                  ]
                                  [],
                                [
                                  Ty.apply
                                    (Ty.path "ruint::Uint")
                                    [
                                      Value.Integer IntegerKind.Usize 256;
                                      Value.Integer IntegerKind.Usize 4
                                    ]
                                    []
                                ],
                                "ne",
                                []
                              |),
                              [ balance; M.get_constant (| "ruint::ZERO" |) ]
                            |));
                          ("is_cold",
                            M.read (|
                              M.SubPointer.get_struct_record_field (|
                                load_result,
                                "revm_interpreter::host::LoadAccountResult",
                                "is_cold"
                              |)
                            |));
                          ("target_exists",
                            UnOp.not (|
                              M.read (|
                                M.SubPointer.get_struct_record_field (|
                                  load_result,
                                  "revm_interpreter::host::LoadAccountResult",
                                  "is_empty"
                                |)
                              |)
                            |));
                          ("previously_destroyed", M.read (| previously_destroyed |))
                        ]
                    ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_selfdestruct : M.IsAssociatedFunction Self "selfdestruct" selfdestruct.
    
    (*
        pub fn initial_account_load<DB: Database>(
            &mut self,
            address: Address,
            slots: &[U256],
            db: &mut DB,
        ) -> Result<&mut Account, EVMError<DB::Error>> {
            // load or get account.
            let account = match self.state.entry(address) {
                Entry::Occupied(entry) => entry.into_mut(),
                Entry::Vacant(vac) => vac.insert(
                    db.basic(address)
                        .map_err(EVMError::Database)?
                        .map(|i| i.into())
                        .unwrap_or(Account::new_not_existing()),
                ),
            };
            // preload storages.
            for slot in slots {
                if let Entry::Vacant(entry) = account.storage.entry( *slot) {
                    let storage = db.storage(address, *slot).map_err(EVMError::Database)?;
                    entry.insert(StorageSlot::new(storage));
                }
            }
            Ok(account)
        }
    *)
    Definition initial_account_load (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ DB ], [ self; address; slots; db ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          let slots := M.alloc (| slots |) in
          let db := M.alloc (| db |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ account :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "std::collections::hash::map::HashMap")
                              []
                              [
                                Ty.path "alloy_primitives::bits::address::Address";
                                Ty.path "revm_primitives::state::Account";
                                Ty.path "std::hash::random::RandomState"
                              ],
                            "entry",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm::journaled_state::JournaledState",
                              "state"
                            |);
                            M.read (| address |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "std::collections::hash::map::Entry::Occupied",
                                0
                              |) in
                            let entry := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "std::collections::hash::map::OccupiedEntry")
                                    []
                                    [
                                      Ty.path "alloy_primitives::bits::address::Address";
                                      Ty.path "revm_primitives::state::Account"
                                    ],
                                  "into_mut",
                                  []
                                |),
                                [ M.read (| entry |) ]
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "std::collections::hash::map::Entry::Vacant",
                                0
                              |) in
                            let vac := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "std::collections::hash::map::VacantEntry")
                                    []
                                    [
                                      Ty.path "alloy_primitives::bits::address::Address";
                                      Ty.path "revm_primitives::state::Account"
                                    ],
                                  "insert",
                                  []
                                |),
                                [
                                  M.read (| vac |);
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "core::option::Option")
                                        []
                                        [ Ty.path "revm_primitives::state::Account" ],
                                      "unwrap_or",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "core::option::Option")
                                            []
                                            [ Ty.path "revm_primitives::state::AccountInfo" ],
                                          "map",
                                          [
                                            Ty.path "revm_primitives::state::Account";
                                            Ty.function
                                              [
                                                Ty.tuple
                                                  [ Ty.path "revm_primitives::state::AccountInfo" ]
                                              ]
                                              (Ty.path "revm_primitives::state::Account")
                                          ]
                                        |),
                                        [
                                          M.read (|
                                            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.apply
                                                          (Ty.path "core::option::Option")
                                                          []
                                                          [
                                                            Ty.path
                                                              "revm_primitives::state::AccountInfo"
                                                          ];
                                                        Ty.apply
                                                          (Ty.path
                                                            "revm_primitives::result::EVMError")
                                                          []
                                                          [ Ty.associated ]
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          []
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::option::Option")
                                                              []
                                                              [
                                                                Ty.path
                                                                  "revm_primitives::state::AccountInfo"
                                                              ];
                                                            Ty.associated
                                                          ],
                                                        "map_err",
                                                        [
                                                          Ty.apply
                                                            (Ty.path
                                                              "revm_primitives::result::EVMError")
                                                            []
                                                            [ Ty.associated ];
                                                          Ty.function
                                                            [ Ty.associated ]
                                                            (Ty.apply
                                                              (Ty.path
                                                                "revm_primitives::result::EVMError")
                                                              []
                                                              [ Ty.associated ])
                                                        ]
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "revm_primitives::db::Database",
                                                            DB,
                                                            [],
                                                            "basic",
                                                            []
                                                          |),
                                                          [ M.read (| db |); M.read (| address |) ]
                                                        |);
                                                        M.constructor_as_closure
                                                          "revm_primitives::result::EVMError::Database"
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                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.apply
                                                                      (Ty.path "&mut")
                                                                      []
                                                                      [
                                                                        Ty.path
                                                                          "revm_primitives::state::Account"
                                                                      ];
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "revm_primitives::result::EVMError")
                                                                      []
                                                                      [ Ty.associated ]
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "revm_primitives::result::EVMError")
                                                                        []
                                                                        [ Ty.associated ]
                                                                    ]
                                                                ],
                                                                "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))
                                              ]
                                            |)
                                          |);
                                          M.closure
                                            (fun γ =>
                                              ltac:(M.monadic
                                                match γ with
                                                | [ α0 ] =>
                                                  ltac:(M.monadic
                                                    (M.match_operator (|
                                                      M.alloc (| α0 |),
                                                      [
                                                        fun γ =>
                                                          ltac:(M.monadic
                                                            (let i := M.copy (| γ |) in
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "core::convert::Into",
                                                                Ty.path
                                                                  "revm_primitives::state::AccountInfo",
                                                                [
                                                                  Ty.path
                                                                    "revm_primitives::state::Account"
                                                                ],
                                                                "into",
                                                                []
                                                              |),
                                                              [ M.read (| i |) ]
                                                            |)))
                                                      ]
                                                    |)))
                                                | _ => M.impossible "wrong number of arguments"
                                                end))
                                        ]
                                      |);
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "revm_primitives::state::Account",
                                          "new_not_existing",
                                          []
                                        |),
                                        []
                                      |)
                                    ]
                                  |)
                                ]
                              |)
                            |)))
                      ]
                    |)
                  |) 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 "slice")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "ruint::Uint")
                                      [
                                        Value.Integer IntegerKind.Usize 256;
                                        Value.Integer IntegerKind.Usize 4
                                      ]
                                      []
                                  ]
                              ],
                            [],
                            "into_iter",
                            []
                          |),
                          [ M.read (| slots |) ]
                        |)
                      |),
                      [
                        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.apply
                                                (Ty.path "ruint::Uint")
                                                [
                                                  Value.Integer IntegerKind.Usize 256;
                                                  Value.Integer IntegerKind.Usize 4
                                                ]
                                                []
                                            ],
                                          [],
                                          "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 slot := M.copy (| γ0_0 |) in
                                          M.match_operator (|
                                            M.alloc (| Value.Tuple [] |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.apply
                                                            (Ty.path
                                                              "std::collections::hash::map::HashMap")
                                                            []
                                                            [
                                                              Ty.apply
                                                                (Ty.path "ruint::Uint")
                                                                [
                                                                  Value.Integer
                                                                    IntegerKind.Usize
                                                                    256;
                                                                  Value.Integer IntegerKind.Usize 4
                                                                ]
                                                                [];
                                                              Ty.path
                                                                "revm_primitives::state::StorageSlot";
                                                              Ty.path
                                                                "std::hash::random::RandomState"
                                                            ],
                                                          "entry",
                                                          []
                                                        |),
                                                        [
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (| account |),
                                                            "revm_primitives::state::Account",
                                                            "storage"
                                                          |);
                                                          M.read (| M.read (| slot |) |)
                                                        ]
                                                      |)
                                                    |) in
                                                  let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "std::collections::hash::map::Entry::Vacant",
                                                      0
                                                    |) in
                                                  let entry := M.copy (| γ0_0 |) in
                                                  let~ storage :=
                                                    M.copy (|
                                                      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.apply
                                                                    (Ty.path "ruint::Uint")
                                                                    [
                                                                      Value.Integer
                                                                        IntegerKind.Usize
                                                                        256;
                                                                      Value.Integer
                                                                        IntegerKind.Usize
                                                                        4
                                                                    ]
                                                                    [];
                                                                  Ty.apply
                                                                    (Ty.path
                                                                      "revm_primitives::result::EVMError")
                                                                    []
                                                                    [ Ty.associated ]
                                                                ],
                                                              [],
                                                              "branch",
                                                              []
                                                            |),
                                                            [
                                                              M.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path "ruint::Uint")
                                                                        [
                                                                          Value.Integer
                                                                            IntegerKind.Usize
                                                                            256;
                                                                          Value.Integer
                                                                            IntegerKind.Usize
                                                                            4
                                                                        ]
                                                                        [];
                                                                      Ty.associated
                                                                    ],
                                                                  "map_err",
                                                                  [
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "revm_primitives::result::EVMError")
                                                                      []
                                                                      [ Ty.associated ];
                                                                    Ty.function
                                                                      [ Ty.associated ]
                                                                      (Ty.apply
                                                                        (Ty.path
                                                                          "revm_primitives::result::EVMError")
                                                                        []
                                                                        [ Ty.associated ])
                                                                  ]
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_trait_method (|
                                                                      "revm_primitives::db::Database",
                                                                      DB,
                                                                      [],
                                                                      "storage",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| db |);
                                                                      M.read (| address |);
                                                                      M.read (| M.read (| slot |) |)
                                                                    ]
                                                                  |);
                                                                  M.constructor_as_closure
                                                                    "revm_primitives::result::EVMError::Database"
                                                                ]
                                                              |)
                                                            ]
                                                          |)
                                                        |),
                                                        [
                                                          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.apply
                                                                                (Ty.path "&mut")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "revm_primitives::state::Account"
                                                                                ];
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "revm_primitives::result::EVMError")
                                                                                []
                                                                                [ Ty.associated ]
                                                                            ],
                                                                          [
                                                                            Ty.apply
                                                                              (Ty.path
                                                                                "core::result::Result")
                                                                              []
                                                                              [
                                                                                Ty.path
                                                                                  "core::convert::Infallible";
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "revm_primitives::result::EVMError")
                                                                                  []
                                                                                  [ Ty.associated ]
                                                                              ]
                                                                          ],
                                                                          "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))
                                                        ]
                                                      |)
                                                    |) in
                                                  let~ _ :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.apply
                                                            (Ty.path
                                                              "std::collections::hash::map::VacantEntry")
                                                            []
                                                            [
                                                              Ty.apply
                                                                (Ty.path "ruint::Uint")
                                                                [
                                                                  Value.Integer
                                                                    IntegerKind.Usize
                                                                    256;
                                                                  Value.Integer IntegerKind.Usize 4
                                                                ]
                                                                [];
                                                              Ty.path
                                                                "revm_primitives::state::StorageSlot"
                                                            ],
                                                          "insert",
                                                          []
                                                        |),
                                                        [
                                                          M.read (| entry |);
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.path
                                                                "revm_primitives::state::StorageSlot",
                                                              "new",
                                                              []
                                                            |),
                                                            [ M.read (| storage |) ]
                                                          |)
                                                        ]
                                                      |)
                                                    |) in
                                                  M.alloc (| Value.Tuple [] |)));
                                              fun γ =>
                                                ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                            ]
                                          |)))
                                    ]
                                  |) in
                                M.alloc (| Value.Tuple [] |)))
                            |)))
                      ]
                    |)) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| account |) ] |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_initial_account_load :
      M.IsAssociatedFunction Self "initial_account_load" initial_account_load.
    
    (*
        pub fn load_account<DB: Database>(
            &mut self,
            address: Address,
            db: &mut DB,
        ) -> Result<(&mut Account, bool), EVMError<DB::Error>> {
            Ok(match self.state.entry(address) {
                Entry::Occupied(entry) => (entry.into_mut(), false),
                Entry::Vacant(vac) => {
                    let account =
                        if let Some(account) = db.basic(address).map_err(EVMError::Database)? {
                            account.into()
                        } else {
                            Account::new_not_existing()
                        };
    
                    // journal loading of account. AccessList touch.
                    self.journal
                        .last_mut()
                        .unwrap()
                        .push(JournalEntry::AccountLoaded { address });
    
                    // precompiles are warm loaded so we need to take that into account
                    let is_cold = !self.warm_preloaded_addresses.contains(&address);
    
                    (vac.insert(account), is_cold)
                }
            })
        }
    *)
    Definition load_account (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ DB ], [ self; address; db ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          let db := M.alloc (| db |) in
          M.catch_return (|
            ltac:(M.monadic
              (Value.StructTuple
                "core::result::Result::Ok"
                [
                  M.read (|
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "std::collections::hash::map::HashMap")
                              []
                              [
                                Ty.path "alloy_primitives::bits::address::Address";
                                Ty.path "revm_primitives::state::Account";
                                Ty.path "std::hash::random::RandomState"
                              ],
                            "entry",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm::journaled_state::JournaledState",
                              "state"
                            |);
                            M.read (| address |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "std::collections::hash::map::Entry::Occupied",
                                0
                              |) in
                            let entry := M.copy (| γ0_0 |) in
                            M.alloc (|
                              Value.Tuple
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "std::collections::hash::map::OccupiedEntry")
                                        []
                                        [
                                          Ty.path "alloy_primitives::bits::address::Address";
                                          Ty.path "revm_primitives::state::Account"
                                        ],
                                      "into_mut",
                                      []
                                    |),
                                    [ M.read (| entry |) ]
                                  |);
                                  Value.Bool false
                                ]
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "std::collections::hash::map::Entry::Vacant",
                                0
                              |) in
                            let vac := M.copy (| γ0_0 |) in
                            let~ account :=
                              M.copy (|
                                M.match_operator (|
                                  M.alloc (| Value.Tuple [] |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ :=
                                          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.apply
                                                        (Ty.path "core::option::Option")
                                                        []
                                                        [
                                                          Ty.path
                                                            "revm_primitives::state::AccountInfo"
                                                        ];
                                                      Ty.apply
                                                        (Ty.path
                                                          "revm_primitives::result::EVMError")
                                                        []
                                                        [ Ty.associated ]
                                                    ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::option::Option")
                                                            []
                                                            [
                                                              Ty.path
                                                                "revm_primitives::state::AccountInfo"
                                                            ];
                                                          Ty.associated
                                                        ],
                                                      "map_err",
                                                      [
                                                        Ty.apply
                                                          (Ty.path
                                                            "revm_primitives::result::EVMError")
                                                          []
                                                          [ Ty.associated ];
                                                        Ty.function
                                                          [ Ty.associated ]
                                                          (Ty.apply
                                                            (Ty.path
                                                              "revm_primitives::result::EVMError")
                                                            []
                                                            [ Ty.associated ])
                                                      ]
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_trait_method (|
                                                          "revm_primitives::db::Database",
                                                          DB,
                                                          [],
                                                          "basic",
                                                          []
                                                        |),
                                                        [ M.read (| db |); M.read (| address |) ]
                                                      |);
                                                      M.constructor_as_closure
                                                        "revm_primitives::result::EVMError::Database"
                                                    ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              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 "&mut")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "revm_primitives::state::Account"
                                                                        ];
                                                                      Ty.path "bool"
                                                                    ];
                                                                  Ty.apply
                                                                    (Ty.path
                                                                      "revm_primitives::result::EVMError")
                                                                    []
                                                                    [ Ty.associated ]
                                                                ],
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  []
                                                                  [
                                                                    Ty.path
                                                                      "core::convert::Infallible";
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "revm_primitives::result::EVMError")
                                                                      []
                                                                      [ Ty.associated ]
                                                                  ]
                                                              ],
                                                              "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))
                                            ]
                                          |) in
                                        let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::option::Option::Some",
                                            0
                                          |) in
                                        let account := M.copy (| γ0_0 |) in
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::convert::Into",
                                              Ty.path "revm_primitives::state::AccountInfo",
                                              [ Ty.path "revm_primitives::state::Account" ],
                                              "into",
                                              []
                                            |),
                                            [ M.read (| account |) ]
                                          |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "revm_primitives::state::Account",
                                              "new_not_existing",
                                              []
                                            |),
                                            []
                                          |)
                                        |)))
                                  ]
                                |)
                              |) in
                            let~ _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "core::option::Option")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path "revm::journaled_state::JournalEntry";
                                                    Ty.path "alloc::alloc::Global"
                                                  ]
                                              ]
                                          ],
                                        "unwrap",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "slice")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path "revm::journaled_state::JournalEntry";
                                                    Ty.path "alloc::alloc::Global"
                                                  ]
                                              ],
                                            "last_mut",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::deref::DerefMut",
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      []
                                                      [
                                                        Ty.path
                                                          "revm::journaled_state::JournalEntry";
                                                        Ty.path "alloc::alloc::Global"
                                                      ];
                                                    Ty.path "alloc::alloc::Global"
                                                  ],
                                                [],
                                                "deref_mut",
                                                []
                                              |),
                                              [
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| self |),
                                                  "revm::journaled_state::JournaledState",
                                                  "journal"
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      ]
                                    |);
                                    Value.StructRecord
                                      "revm::journaled_state::JournalEntry::AccountLoaded"
                                      [ ("address", M.read (| address |)) ]
                                  ]
                                |)
                              |) in
                            let~ is_cold :=
                              M.alloc (|
                                UnOp.not (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "std::collections::hash::set::HashSet")
                                        []
                                        [
                                          Ty.path "alloy_primitives::bits::address::Address";
                                          Ty.path "std::hash::random::RandomState"
                                        ],
                                      "contains",
                                      [ Ty.path "alloy_primitives::bits::address::Address" ]
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "revm::journaled_state::JournaledState",
                                        "warm_preloaded_addresses"
                                      |);
                                      address
                                    ]
                                  |)
                                |)
                              |) in
                            M.alloc (|
                              Value.Tuple
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "std::collections::hash::map::VacantEntry")
                                        []
                                        [
                                          Ty.path "alloy_primitives::bits::address::Address";
                                          Ty.path "revm_primitives::state::Account"
                                        ],
                                      "insert",
                                      []
                                    |),
                                    [ M.read (| vac |); M.read (| account |) ]
                                  |);
                                  M.read (| is_cold |)
                                ]
                            |)))
                      ]
                    |)
                  |)
                ]))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_load_account : M.IsAssociatedFunction Self "load_account" load_account.
    
    (*
        pub fn load_account_exist<DB: Database>(
            &mut self,
            address: Address,
            db: &mut DB,
        ) -> Result<LoadAccountResult, EVMError<DB::Error>> {
            let spec = self.spec;
            let (acc, is_cold) = self.load_account(address, db)?;
    
            let is_spurious_dragon_enabled = SpecId::enabled(spec, SPURIOUS_DRAGON);
            let is_empty = if is_spurious_dragon_enabled {
                acc.is_empty()
            } else {
                let loaded_not_existing = acc.is_loaded_as_not_existing();
                let is_not_touched = !acc.is_touched();
                loaded_not_existing && is_not_touched
            };
    
            Ok(LoadAccountResult { is_empty, is_cold })
        }
    *)
    Definition load_account_exist (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ DB ], [ self; address; db ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          let db := M.alloc (| db |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ spec :=
                  M.copy (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "spec"
                    |)
                  |) 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 "&mut")
                                    []
                                    [ Ty.path "revm_primitives::state::Account" ];
                                  Ty.path "bool"
                                ];
                              Ty.apply
                                (Ty.path "revm_primitives::result::EVMError")
                                []
                                [ Ty.associated ]
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "revm::journaled_state::JournaledState",
                              "load_account",
                              [ DB ]
                            |),
                            [ M.read (| self |); M.read (| address |); M.read (| db |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.path "revm_interpreter::host::LoadAccountResult";
                                          Ty.apply
                                            (Ty.path "revm_primitives::result::EVMError")
                                            []
                                            [ Ty.associated ]
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.apply
                                              (Ty.path "revm_primitives::result::EVMError")
                                              []
                                              [ Ty.associated ]
                                          ]
                                      ],
                                      "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 acc := M.copy (| γ0_0 |) in
                        let is_cold := M.copy (| γ0_1 |) in
                        let~ is_spurious_dragon_enabled :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path "revm_primitives::specification::SpecId",
                                "enabled",
                                []
                              |),
                              [
                                M.read (| spec |);
                                Value.StructTuple
                                  "revm_primitives::specification::SpecId::SPURIOUS_DRAGON"
                                  []
                              ]
                            |)
                          |) in
                        let~ is_empty :=
                          M.copy (|
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ := M.use is_spurious_dragon_enabled in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "revm_primitives::state::Account",
                                          "is_empty",
                                          []
                                        |),
                                        [ M.read (| acc |) ]
                                      |)
                                    |)));
                                fun γ =>
                                  ltac:(M.monadic
                                    (let~ loaded_not_existing :=
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "revm_primitives::state::Account",
                                            "is_loaded_as_not_existing",
                                            []
                                          |),
                                          [ M.read (| acc |) ]
                                        |)
                                      |) in
                                    let~ is_not_touched :=
                                      M.alloc (|
                                        UnOp.not (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "revm_primitives::state::Account",
                                              "is_touched",
                                              []
                                            |),
                                            [ M.read (| acc |) ]
                                          |)
                                        |)
                                      |) in
                                    M.alloc (|
                                      LogicalOp.and (|
                                        M.read (| loaded_not_existing |),
                                        ltac:(M.monadic (M.read (| is_not_touched |)))
                                      |)
                                    |)))
                              ]
                            |)
                          |) in
                        M.alloc (|
                          Value.StructTuple
                            "core::result::Result::Ok"
                            [
                              Value.StructRecord
                                "revm_interpreter::host::LoadAccountResult"
                                [
                                  ("is_empty", M.read (| is_empty |));
                                  ("is_cold", M.read (| is_cold |))
                                ]
                            ]
                        |)))
                  ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_load_account_exist :
      M.IsAssociatedFunction Self "load_account_exist" load_account_exist.
    
    (*
        pub fn load_code<DB: Database>(
            &mut self,
            address: Address,
            db: &mut DB,
        ) -> Result<(&mut Account, bool), EVMError<DB::Error>> {
            let (acc, is_cold) = self.load_account(address, db)?;
            if acc.info.code.is_none() {
                if acc.info.code_hash == KECCAK_EMPTY {
                    let empty = Bytecode::default();
                    acc.info.code = Some(empty);
                } else {
                    let code = db
                        .code_by_hash(acc.info.code_hash)
                        .map_err(EVMError::Database)?;
                    acc.info.code = Some(code);
                }
            }
            Ok((acc, is_cold))
        }
    *)
    Definition load_code (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ DB ], [ self; address; db ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          let db := M.alloc (| db |) 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 "&mut")
                                    []
                                    [ Ty.path "revm_primitives::state::Account" ];
                                  Ty.path "bool"
                                ];
                              Ty.apply
                                (Ty.path "revm_primitives::result::EVMError")
                                []
                                [ Ty.associated ]
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "revm::journaled_state::JournaledState",
                              "load_account",
                              [ DB ]
                            |),
                            [ M.read (| self |); M.read (| address |); M.read (| db |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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 "&mut")
                                                []
                                                [ Ty.path "revm_primitives::state::Account" ];
                                              Ty.path "bool"
                                            ];
                                          Ty.apply
                                            (Ty.path "revm_primitives::result::EVMError")
                                            []
                                            [ Ty.associated ]
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.apply
                                              (Ty.path "revm_primitives::result::EVMError")
                                              []
                                              [ Ty.associated ]
                                          ]
                                      ],
                                      "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 acc := M.copy (| γ0_0 |) in
                        let is_cold := M.copy (| γ0_1 |) 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 "core::option::Option")
                                              []
                                              [ Ty.path "revm_primitives::bytecode::Bytecode" ],
                                            "is_none",
                                            []
                                          |),
                                          [
                                            M.SubPointer.get_struct_record_field (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| acc |),
                                                "revm_primitives::state::Account",
                                                "info"
                                              |),
                                              "revm_primitives::state::AccountInfo",
                                              "code"
                                            |)
                                          ]
                                        |)
                                      |)) 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 (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::cmp::PartialEq",
                                                    Ty.apply
                                                      (Ty.path
                                                        "alloy_primitives::bits::fixed::FixedBytes")
                                                      [ Value.Integer IntegerKind.Usize 32 ]
                                                      [],
                                                    [
                                                      Ty.apply
                                                        (Ty.path
                                                          "alloy_primitives::bits::fixed::FixedBytes")
                                                        [ Value.Integer IntegerKind.Usize 32 ]
                                                        []
                                                    ],
                                                    "eq",
                                                    []
                                                  |),
                                                  [
                                                    M.SubPointer.get_struct_record_field (|
                                                      M.SubPointer.get_struct_record_field (|
                                                        M.read (| acc |),
                                                        "revm_primitives::state::Account",
                                                        "info"
                                                      |),
                                                      "revm_primitives::state::AccountInfo",
                                                      "code_hash"
                                                    |);
                                                    M.get_constant (|
                                                      "revm_primitives::utilities::KECCAK_EMPTY"
                                                    |)
                                                  ]
                                                |)
                                              |)) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.Bool true
                                            |) in
                                          let~ empty :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::default::Default",
                                                  Ty.path "revm_primitives::bytecode::Bytecode",
                                                  [],
                                                  "default",
                                                  []
                                                |),
                                                []
                                              |)
                                            |) in
                                          let~ _ :=
                                            M.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| acc |),
                                                  "revm_primitives::state::Account",
                                                  "info"
                                                |),
                                                "revm_primitives::state::AccountInfo",
                                                "code"
                                              |),
                                              Value.StructTuple
                                                "core::option::Option::Some"
                                                [ M.read (| empty |) ]
                                            |) in
                                          M.alloc (| Value.Tuple [] |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let~ code :=
                                            M.copy (|
                                              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.path
                                                            "revm_primitives::bytecode::Bytecode";
                                                          Ty.apply
                                                            (Ty.path
                                                              "revm_primitives::result::EVMError")
                                                            []
                                                            [ Ty.associated ]
                                                        ],
                                                      [],
                                                      "branch",
                                                      []
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path
                                                                "revm_primitives::bytecode::Bytecode";
                                                              Ty.associated
                                                            ],
                                                          "map_err",
                                                          [
                                                            Ty.apply
                                                              (Ty.path
                                                                "revm_primitives::result::EVMError")
                                                              []
                                                              [ Ty.associated ];
                                                            Ty.function
                                                              [ Ty.associated ]
                                                              (Ty.apply
                                                                (Ty.path
                                                                  "revm_primitives::result::EVMError")
                                                                []
                                                                [ Ty.associated ])
                                                          ]
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "revm_primitives::db::Database",
                                                              DB,
                                                              [],
                                                              "code_by_hash",
                                                              []
                                                            |),
                                                            [
                                                              M.read (| db |);
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    M.read (| acc |),
                                                                    "revm_primitives::state::Account",
                                                                    "info"
                                                                  |),
                                                                  "revm_primitives::state::AccountInfo",
                                                                  "code_hash"
                                                                |)
                                                              |)
                                                            ]
                                                          |);
                                                          M.constructor_as_closure
                                                            "revm_primitives::result::EVMError::Database"
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  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 "&mut")
                                                                            []
                                                                            [
                                                                              Ty.path
                                                                                "revm_primitives::state::Account"
                                                                            ];
                                                                          Ty.path "bool"
                                                                        ];
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "revm_primitives::result::EVMError")
                                                                        []
                                                                        [ Ty.associated ]
                                                                    ],
                                                                  [
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      []
                                                                      [
                                                                        Ty.path
                                                                          "core::convert::Infallible";
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "revm_primitives::result::EVMError")
                                                                          []
                                                                          [ Ty.associated ]
                                                                      ]
                                                                  ],
                                                                  "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))
                                                ]
                                              |)
                                            |) in
                                          let~ _ :=
                                            M.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| acc |),
                                                  "revm_primitives::state::Account",
                                                  "info"
                                                |),
                                                "revm_primitives::state::AccountInfo",
                                                "code"
                                              |),
                                              Value.StructTuple
                                                "core::option::Option::Some"
                                                [ M.read (| code |) ]
                                            |) in
                                          M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |) in
                        M.alloc (|
                          Value.StructTuple
                            "core::result::Result::Ok"
                            [ Value.Tuple [ M.read (| acc |); M.read (| is_cold |) ] ]
                        |)))
                  ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_load_code : M.IsAssociatedFunction Self "load_code" load_code.
    
    (*
        pub fn sload<DB: Database>(
            &mut self,
            address: Address,
            key: U256,
            db: &mut DB,
        ) -> Result<(U256, bool), EVMError<DB::Error>> {
            // assume acc is warm
            let account = self.state.get_mut(&address).unwrap();
            // only if account is created in this tx we can assume that storage is empty.
            let is_newly_created = account.is_created();
            let load = match account.storage.entry(key) {
                Entry::Occupied(occ) => (occ.get().present_value, false),
                Entry::Vacant(vac) => {
                    // if storage was cleared, we don't need to ping db.
                    let value = if is_newly_created {
                        U256::ZERO
                    } else {
                        db.storage(address, key).map_err(EVMError::Database)?
                    };
                    // add it to journal as cold loaded.
                    self.journal
                        .last_mut()
                        .unwrap()
                        .push(JournalEntry::StorageChange {
                            address,
                            key,
                            had_value: None,
                        });
    
                    vac.insert(StorageSlot::new(value));
    
                    (value, true)
                }
            };
            Ok(load)
        }
    *)
    Definition sload (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ DB ], [ self; address; key; db ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          let key := M.alloc (| key |) in
          let db := M.alloc (| db |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ account :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "core::option::Option")
                          []
                          [
                            Ty.apply
                              (Ty.path "&mut")
                              []
                              [ Ty.path "revm_primitives::state::Account" ]
                          ],
                        "unwrap",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "std::collections::hash::map::HashMap")
                              []
                              [
                                Ty.path "alloy_primitives::bits::address::Address";
                                Ty.path "revm_primitives::state::Account";
                                Ty.path "std::hash::random::RandomState"
                              ],
                            "get_mut",
                            [ Ty.path "alloy_primitives::bits::address::Address" ]
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "revm::journaled_state::JournaledState",
                              "state"
                            |);
                            address
                          ]
                        |)
                      ]
                    |)
                  |) in
                let~ is_newly_created :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "revm_primitives::state::Account",
                        "is_created",
                        []
                      |),
                      [ M.read (| account |) ]
                    |)
                  |) in
                let~ load :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "std::collections::hash::map::HashMap")
                              []
                              [
                                Ty.apply
                                  (Ty.path "ruint::Uint")
                                  [
                                    Value.Integer IntegerKind.Usize 256;
                                    Value.Integer IntegerKind.Usize 4
                                  ]
                                  [];
                                Ty.path "revm_primitives::state::StorageSlot";
                                Ty.path "std::hash::random::RandomState"
                              ],
                            "entry",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| account |),
                              "revm_primitives::state::Account",
                              "storage"
                            |);
                            M.read (| key |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "std::collections::hash::map::Entry::Occupied",
                                0
                              |) in
                            let occ := M.copy (| γ0_0 |) in
                            M.alloc (|
                              Value.Tuple
                                [
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "std::collections::hash::map::OccupiedEntry")
                                            []
                                            [
                                              Ty.apply
                                                (Ty.path "ruint::Uint")
                                                [
                                                  Value.Integer IntegerKind.Usize 256;
                                                  Value.Integer IntegerKind.Usize 4
                                                ]
                                                [];
                                              Ty.path "revm_primitives::state::StorageSlot"
                                            ],
                                          "get",
                                          []
                                        |),
                                        [ occ ]
                                      |),
                                      "revm_primitives::state::StorageSlot",
                                      "present_value"
                                    |)
                                  |);
                                  Value.Bool false
                                ]
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "std::collections::hash::map::Entry::Vacant",
                                0
                              |) in
                            let vac := M.copy (| γ0_0 |) in
                            let~ value :=
                              M.copy (|
                                M.match_operator (|
                                  M.alloc (| Value.Tuple [] |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ := M.use is_newly_created in
                                        let _ :=
                                          M.is_constant_or_break_match (|
                                            M.read (| γ |),
                                            Value.Bool true
                                          |) in
                                        M.get_constant (| "ruint::ZERO" |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (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.apply
                                                      (Ty.path "ruint::Uint")
                                                      [
                                                        Value.Integer IntegerKind.Usize 256;
                                                        Value.Integer IntegerKind.Usize 4
                                                      ]
                                                      [];
                                                    Ty.apply
                                                      (Ty.path "revm_primitives::result::EVMError")
                                                      []
                                                      [ Ty.associated ]
                                                  ],
                                                [],
                                                "branch",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      []
                                                      [
                                                        Ty.apply
                                                          (Ty.path "ruint::Uint")
                                                          [
                                                            Value.Integer IntegerKind.Usize 256;
                                                            Value.Integer IntegerKind.Usize 4
                                                          ]
                                                          [];
                                                        Ty.associated
                                                      ],
                                                    "map_err",
                                                    [
                                                      Ty.apply
                                                        (Ty.path
                                                          "revm_primitives::result::EVMError")
                                                        []
                                                        [ Ty.associated ];
                                                      Ty.function
                                                        [ Ty.associated ]
                                                        (Ty.apply
                                                          (Ty.path
                                                            "revm_primitives::result::EVMError")
                                                          []
                                                          [ Ty.associated ])
                                                    ]
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "revm_primitives::db::Database",
                                                        DB,
                                                        [],
                                                        "storage",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| db |);
                                                        M.read (| address |);
                                                        M.read (| key |)
                                                      ]
                                                    |);
                                                    M.constructor_as_closure
                                                      "revm_primitives::result::EVMError::Database"
                                                  ]
                                                |)
                                              ]
                                            |)
                                          |),
                                          [
                                            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 "ruint::Uint")
                                                                      [
                                                                        Value.Integer
                                                                          IntegerKind.Usize
                                                                          256;
                                                                        Value.Integer
                                                                          IntegerKind.Usize
                                                                          4
                                                                      ]
                                                                      [];
                                                                    Ty.path "bool"
                                                                  ];
                                                                Ty.apply
                                                                  (Ty.path
                                                                    "revm_primitives::result::EVMError")
                                                                  []
                                                                  [ Ty.associated ]
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                []
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.apply
                                                                    (Ty.path
                                                                      "revm_primitives::result::EVMError")
                                                                    []
                                                                    [ Ty.associated ]
                                                                ]
                                                            ],
                                                            "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))
                                          ]
                                        |)))
                                  ]
                                |)
                              |) in
                            let~ _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "revm::journaled_state::JournalEntry";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "core::option::Option")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path "revm::journaled_state::JournalEntry";
                                                    Ty.path "alloc::alloc::Global"
                                                  ]
                                              ]
                                          ],
                                        "unwrap",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "slice")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path "revm::journaled_state::JournalEntry";
                                                    Ty.path "alloc::alloc::Global"
                                                  ]
                                              ],
                                            "last_mut",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::deref::DerefMut",
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      []
                                                      [
                                                        Ty.path
                                                          "revm::journaled_state::JournalEntry";
                                                        Ty.path "alloc::alloc::Global"
                                                      ];
                                                    Ty.path "alloc::alloc::Global"
                                                  ],
                                                [],
                                                "deref_mut",
                                                []
                                              |),
                                              [
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| self |),
                                                  "revm::journaled_state::JournaledState",
                                                  "journal"
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      ]
                                    |);
                                    Value.StructRecord
                                      "revm::journaled_state::JournalEntry::StorageChange"
                                      [
                                        ("address", M.read (| address |));
                                        ("key", M.read (| key |));
                                        ("had_value",
                                          Value.StructTuple "core::option::Option::None" [])
                                      ]
                                  ]
                                |)
                              |) in
                            let~ _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "std::collections::hash::map::VacantEntry")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "ruint::Uint")
                                          [
                                            Value.Integer IntegerKind.Usize 256;
                                            Value.Integer IntegerKind.Usize 4
                                          ]
                                          [];
                                        Ty.path "revm_primitives::state::StorageSlot"
                                      ],
                                    "insert",
                                    []
                                  |),
                                  [
                                    M.read (| vac |);
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "revm_primitives::state::StorageSlot",
                                        "new",
                                        []
                                      |),
                                      [ M.read (| value |) ]
                                    |)
                                  ]
                                |)
                              |) in
                            M.alloc (| Value.Tuple [ M.read (| value |); Value.Bool true ] |)))
                      ]
                    |)
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| load |) ] |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_sload : M.IsAssociatedFunction Self "sload" sload.
    
    (*
        pub fn sstore<DB: Database>(
            &mut self,
            address: Address,
            key: U256,
            new: U256,
            db: &mut DB,
        ) -> Result<SStoreResult, EVMError<DB::Error>> {
            // assume that acc exists and load the slot.
            let (present, is_cold) = self.sload(address, key, db)?;
            let acc = self.state.get_mut(&address).unwrap();
    
            // if there is no original value in dirty return present value, that is our original.
            let slot = acc.storage.get_mut(&key).unwrap();
    
            // new value is same as present, we don't need to do anything
            if present == new {
                return Ok(SStoreResult {
                    original_value: slot.previous_or_original_value,
                    present_value: present,
                    new_value: new,
                    is_cold,
                });
            }
    
            self.journal
                .last_mut()
                .unwrap()
                .push(JournalEntry::StorageChange {
                    address,
                    key,
                    had_value: Some(present),
                });
            // insert value into present state.
            slot.present_value = new;
            Ok(SStoreResult {
                original_value: slot.previous_or_original_value,
                present_value: present,
                new_value: new,
                is_cold,
            })
        }
    *)
    Definition sstore (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ DB ], [ self; address; key; new; db ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          let key := M.alloc (| key |) in
          let new := M.alloc (| new |) in
          let db := M.alloc (| db |) 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 "ruint::Uint")
                                    [
                                      Value.Integer IntegerKind.Usize 256;
                                      Value.Integer IntegerKind.Usize 4
                                    ]
                                    [];
                                  Ty.path "bool"
                                ];
                              Ty.apply
                                (Ty.path "revm_primitives::result::EVMError")
                                []
                                [ Ty.associated ]
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "revm::journaled_state::JournaledState",
                              "sload",
                              [ DB ]
                            |),
                            [
                              M.read (| self |);
                              M.read (| address |);
                              M.read (| key |);
                              M.read (| db |)
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.path "revm_interpreter::host::SStoreResult";
                                          Ty.apply
                                            (Ty.path "revm_primitives::result::EVMError")
                                            []
                                            [ Ty.associated ]
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.apply
                                              (Ty.path "revm_primitives::result::EVMError")
                                              []
                                              [ Ty.associated ]
                                          ]
                                      ],
                                      "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 present := M.copy (| γ0_0 |) in
                        let is_cold := M.copy (| γ0_1 |) in
                        let~ acc :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "core::option::Option")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "&mut")
                                      []
                                      [ Ty.path "revm_primitives::state::Account" ]
                                  ],
                                "unwrap",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "std::collections::hash::map::HashMap")
                                      []
                                      [
                                        Ty.path "alloy_primitives::bits::address::Address";
                                        Ty.path "revm_primitives::state::Account";
                                        Ty.path "std::hash::random::RandomState"
                                      ],
                                    "get_mut",
                                    [ Ty.path "alloy_primitives::bits::address::Address" ]
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "revm::journaled_state::JournaledState",
                                      "state"
                                    |);
                                    address
                                  ]
                                |)
                              ]
                            |)
                          |) in
                        let~ slot :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "core::option::Option")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "&mut")
                                      []
                                      [ Ty.path "revm_primitives::state::StorageSlot" ]
                                  ],
                                "unwrap",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "std::collections::hash::map::HashMap")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "ruint::Uint")
                                          [
                                            Value.Integer IntegerKind.Usize 256;
                                            Value.Integer IntegerKind.Usize 4
                                          ]
                                          [];
                                        Ty.path "revm_primitives::state::StorageSlot";
                                        Ty.path "std::hash::random::RandomState"
                                      ],
                                    "get_mut",
                                    [
                                      Ty.apply
                                        (Ty.path "ruint::Uint")
                                        [
                                          Value.Integer IntegerKind.Usize 256;
                                          Value.Integer IntegerKind.Usize 4
                                        ]
                                        []
                                    ]
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| acc |),
                                      "revm_primitives::state::Account",
                                      "storage"
                                    |);
                                    key
                                  ]
                                |)
                              ]
                            |)
                          |) in
                        let~ _ :=
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.use
                                      (M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::cmp::PartialEq",
                                            Ty.apply
                                              (Ty.path "ruint::Uint")
                                              [
                                                Value.Integer IntegerKind.Usize 256;
                                                Value.Integer IntegerKind.Usize 4
                                              ]
                                              [],
                                            [
                                              Ty.apply
                                                (Ty.path "ruint::Uint")
                                                [
                                                  Value.Integer IntegerKind.Usize 256;
                                                  Value.Integer IntegerKind.Usize 4
                                                ]
                                                []
                                            ],
                                            "eq",
                                            []
                                          |),
                                          [ present; new ]
                                        |)
                                      |)) 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::Ok"
                                            [
                                              Value.StructRecord
                                                "revm_interpreter::host::SStoreResult"
                                                [
                                                  ("original_value",
                                                    M.read (|
                                                      M.SubPointer.get_struct_record_field (|
                                                        M.read (| slot |),
                                                        "revm_primitives::state::StorageSlot",
                                                        "previous_or_original_value"
                                                      |)
                                                    |));
                                                  ("present_value", M.read (| present |));
                                                  ("new_value", M.read (| new |));
                                                  ("is_cold", M.read (| is_cold |))
                                                ]
                                            ]
                                        |)
                                      |)
                                    |)
                                  |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |) in
                        let~ _ :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "revm::journaled_state::JournalEntry";
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                "push",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::option::Option")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "alloc::vec::Vec")
                                              []
                                              [
                                                Ty.path "revm::journaled_state::JournalEntry";
                                                Ty.path "alloc::alloc::Global"
                                              ]
                                          ]
                                      ],
                                    "unwrap",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "slice")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "alloc::vec::Vec")
                                              []
                                              [
                                                Ty.path "revm::journaled_state::JournalEntry";
                                                Ty.path "alloc::alloc::Global"
                                              ]
                                          ],
                                        "last_mut",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::ops::deref::DerefMut",
                                            Ty.apply
                                              (Ty.path "alloc::vec::Vec")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path "revm::journaled_state::JournalEntry";
                                                    Ty.path "alloc::alloc::Global"
                                                  ];
                                                Ty.path "alloc::alloc::Global"
                                              ],
                                            [],
                                            "deref_mut",
                                            []
                                          |),
                                          [
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| self |),
                                              "revm::journaled_state::JournaledState",
                                              "journal"
                                            |)
                                          ]
                                        |)
                                      ]
                                    |)
                                  ]
                                |);
                                Value.StructRecord
                                  "revm::journaled_state::JournalEntry::StorageChange"
                                  [
                                    ("address", M.read (| address |));
                                    ("key", M.read (| key |));
                                    ("had_value",
                                      Value.StructTuple
                                        "core::option::Option::Some"
                                        [ M.read (| present |) ])
                                  ]
                              ]
                            |)
                          |) in
                        let~ _ :=
                          M.write (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| slot |),
                              "revm_primitives::state::StorageSlot",
                              "present_value"
                            |),
                            M.read (| new |)
                          |) in
                        M.alloc (|
                          Value.StructTuple
                            "core::result::Result::Ok"
                            [
                              Value.StructRecord
                                "revm_interpreter::host::SStoreResult"
                                [
                                  ("original_value",
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| slot |),
                                        "revm_primitives::state::StorageSlot",
                                        "previous_or_original_value"
                                      |)
                                    |));
                                  ("present_value", M.read (| present |));
                                  ("new_value", M.read (| new |));
                                  ("is_cold", M.read (| is_cold |))
                                ]
                            ]
                        |)))
                  ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_sstore : M.IsAssociatedFunction Self "sstore" sstore.
    
    (*
        pub fn tload(&mut self, address: Address, key: U256) -> U256 {
            self.transient_storage
                .get(&(address, key))
                .copied()
                .unwrap_or_default()
        }
    *)
    Definition tload (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; address; key ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          let key := M.alloc (| key |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply
                (Ty.path "core::option::Option")
                []
                [
                  Ty.apply
                    (Ty.path "ruint::Uint")
                    [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                    []
                ],
              "unwrap_or_default",
              []
            |),
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "core::option::Option")
                    []
                    [
                      Ty.apply
                        (Ty.path "&")
                        []
                        [
                          Ty.apply
                            (Ty.path "ruint::Uint")
                            [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4
                            ]
                            []
                        ]
                    ],
                  "copied",
                  []
                |),
                [
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "std::collections::hash::map::HashMap")
                        []
                        [
                          Ty.tuple
                            [
                              Ty.path "alloy_primitives::bits::address::Address";
                              Ty.apply
                                (Ty.path "ruint::Uint")
                                [
                                  Value.Integer IntegerKind.Usize 256;
                                  Value.Integer IntegerKind.Usize 4
                                ]
                                []
                            ];
                          Ty.apply
                            (Ty.path "ruint::Uint")
                            [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4
                            ]
                            [];
                          Ty.path "std::hash::random::RandomState"
                        ],
                      "get",
                      [
                        Ty.tuple
                          [
                            Ty.path "alloy_primitives::bits::address::Address";
                            Ty.apply
                              (Ty.path "ruint::Uint")
                              [
                                Value.Integer IntegerKind.Usize 256;
                                Value.Integer IntegerKind.Usize 4
                              ]
                              []
                          ]
                      ]
                    |),
                    [
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "revm::journaled_state::JournaledState",
                        "transient_storage"
                      |);
                      M.alloc (| Value.Tuple [ M.read (| address |); M.read (| key |) ] |)
                    ]
                  |)
                ]
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_tload : M.IsAssociatedFunction Self "tload" tload.
    
    (*
        pub fn tstore(&mut self, address: Address, key: U256, new: U256) {
            let had_value = if new == U256::ZERO {
                // if new values is zero, remove entry from transient storage.
                // if previous values was some insert it inside journal.
                // If it is none nothing should be inserted.
                self.transient_storage.remove(&(address, key))
            } else {
                // insert values
                let previous_value = self
                    .transient_storage
                    .insert((address, key), new)
                    .unwrap_or_default();
    
                // check if previous value is same
                if previous_value != new {
                    // if it is different, insert previous values inside journal.
                    Some(previous_value)
                } else {
                    None
                }
            };
    
            if let Some(had_value) = had_value {
                // insert in journal only if value was changed.
                self.journal
                    .last_mut()
                    .unwrap()
                    .push(JournalEntry::TransientStorageChange {
                        address,
                        key,
                        had_value,
                    });
            }
        }
    *)
    Definition tstore (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; address; key; new ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let address := M.alloc (| address |) in
          let key := M.alloc (| key |) in
          let new := M.alloc (| new |) in
          M.read (|
            let~ had_value :=
              M.copy (|
                M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ :=
                          M.use
                            (M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply
                                    (Ty.path "ruint::Uint")
                                    [
                                      Value.Integer IntegerKind.Usize 256;
                                      Value.Integer IntegerKind.Usize 4
                                    ]
                                    [],
                                  [
                                    Ty.apply
                                      (Ty.path "ruint::Uint")
                                      [
                                        Value.Integer IntegerKind.Usize 256;
                                        Value.Integer IntegerKind.Usize 4
                                      ]
                                      []
                                  ],
                                  "eq",
                                  []
                                |),
                                [ new; M.get_constant (| "ruint::ZERO" |) ]
                              |)
                            |)) in
                        let _ :=
                          M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                        M.alloc (|
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "std::collections::hash::map::HashMap")
                                []
                                [
                                  Ty.tuple
                                    [
                                      Ty.path "alloy_primitives::bits::address::Address";
                                      Ty.apply
                                        (Ty.path "ruint::Uint")
                                        [
                                          Value.Integer IntegerKind.Usize 256;
                                          Value.Integer IntegerKind.Usize 4
                                        ]
                                        []
                                    ];
                                  Ty.apply
                                    (Ty.path "ruint::Uint")
                                    [
                                      Value.Integer IntegerKind.Usize 256;
                                      Value.Integer IntegerKind.Usize 4
                                    ]
                                    [];
                                  Ty.path "std::hash::random::RandomState"
                                ],
                              "remove",
                              [
                                Ty.tuple
                                  [
                                    Ty.path "alloy_primitives::bits::address::Address";
                                    Ty.apply
                                      (Ty.path "ruint::Uint")
                                      [
                                        Value.Integer IntegerKind.Usize 256;
                                        Value.Integer IntegerKind.Usize 4
                                      ]
                                      []
                                  ]
                              ]
                            |),
                            [
                              M.SubPointer.get_struct_record_field (|
                                M.read (| self |),
                                "revm::journaled_state::JournaledState",
                                "transient_storage"
                              |);
                              M.alloc (| Value.Tuple [ M.read (| address |); M.read (| key |) ] |)
                            ]
                          |)
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let~ previous_value :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "core::option::Option")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "ruint::Uint")
                                      [
                                        Value.Integer IntegerKind.Usize 256;
                                        Value.Integer IntegerKind.Usize 4
                                      ]
                                      []
                                  ],
                                "unwrap_or_default",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "std::collections::hash::map::HashMap")
                                      []
                                      [
                                        Ty.tuple
                                          [
                                            Ty.path "alloy_primitives::bits::address::Address";
                                            Ty.apply
                                              (Ty.path "ruint::Uint")
                                              [
                                                Value.Integer IntegerKind.Usize 256;
                                                Value.Integer IntegerKind.Usize 4
                                              ]
                                              []
                                          ];
                                        Ty.apply
                                          (Ty.path "ruint::Uint")
                                          [
                                            Value.Integer IntegerKind.Usize 256;
                                            Value.Integer IntegerKind.Usize 4
                                          ]
                                          [];
                                        Ty.path "std::hash::random::RandomState"
                                      ],
                                    "insert",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "revm::journaled_state::JournaledState",
                                      "transient_storage"
                                    |);
                                    Value.Tuple [ M.read (| address |); M.read (| key |) ];
                                    M.read (| new |)
                                  ]
                                |)
                              ]
                            |)
                          |) in
                        M.match_operator (|
                          M.alloc (| Value.Tuple [] |),
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let γ :=
                                  M.use
                                    (M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::cmp::PartialEq",
                                          Ty.apply
                                            (Ty.path "ruint::Uint")
                                            [
                                              Value.Integer IntegerKind.Usize 256;
                                              Value.Integer IntegerKind.Usize 4
                                            ]
                                            [],
                                          [
                                            Ty.apply
                                              (Ty.path "ruint::Uint")
                                              [
                                                Value.Integer IntegerKind.Usize 256;
                                                Value.Integer IntegerKind.Usize 4
                                              ]
                                              []
                                          ],
                                          "ne",
                                          []
                                        |),
                                        [ previous_value; new ]
                                      |)
                                    |)) in
                                let _ :=
                                  M.is_constant_or_break_match (|
                                    M.read (| γ |),
                                    Value.Bool true
                                  |) in
                                M.alloc (|
                                  Value.StructTuple
                                    "core::option::Option::Some"
                                    [ M.read (| previous_value |) ]
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (| Value.StructTuple "core::option::Option::None" [] |)))
                          ]
                        |)))
                  ]
                |)
              |) in
            M.match_operator (|
              M.alloc (| Value.Tuple [] |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ := had_value in
                    let γ0_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::option::Option::Some",
                        0
                      |) in
                    let had_value := M.copy (| γ0_0 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "alloc::vec::Vec")
                              []
                              [
                                Ty.path "revm::journaled_state::JournalEntry";
                                Ty.path "alloc::alloc::Global"
                              ],
                            "push",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "core::option::Option")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "&mut")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.path "revm::journaled_state::JournalEntry";
                                            Ty.path "alloc::alloc::Global"
                                          ]
                                      ]
                                  ],
                                "unwrap",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "slice")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.path "revm::journaled_state::JournalEntry";
                                            Ty.path "alloc::alloc::Global"
                                          ]
                                      ],
                                    "last_mut",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "alloc::vec::Vec")
                                              []
                                              [
                                                Ty.path "revm::journaled_state::JournalEntry";
                                                Ty.path "alloc::alloc::Global"
                                              ];
                                            Ty.path "alloc::alloc::Global"
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| self |),
                                          "revm::journaled_state::JournaledState",
                                          "journal"
                                        |)
                                      ]
                                    |)
                                  ]
                                |)
                              ]
                            |);
                            Value.StructRecord
                              "revm::journaled_state::JournalEntry::TransientStorageChange"
                              [
                                ("address", M.read (| address |));
                                ("key", M.read (| key |));
                                ("had_value", M.read (| had_value |))
                              ]
                          ]
                        |)
                      |) in
                    M.alloc (| Value.Tuple [] |)));
                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_tstore : M.IsAssociatedFunction Self "tstore" tstore.
    
    (*
        pub fn log(&mut self, log: Log) {
            self.logs.push(log);
        }
    *)
    Definition log (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; log ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let log := M.alloc (| log |) in
          M.read (|
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [
                        Ty.apply
                          (Ty.path "alloy_primitives::log::Log")
                          []
                          [ Ty.path "alloy_primitives::log::LogData" ];
                        Ty.path "alloc::alloc::Global"
                      ],
                    "push",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "revm::journaled_state::JournaledState",
                      "logs"
                    |);
                    M.read (| log |)
                  ]
                |)
              |) in
            M.alloc (| Value.Tuple [] |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_log : M.IsAssociatedFunction Self "log" log.
  End Impl_revm_journaled_state_JournaledState.
  
  (*
  Enum JournalEntry
  {
    const_params := [];
    ty_params := [];
    variants :=
      [
        {
          name := "AccountLoaded";
          item := StructRecord [ ("address", Ty.path "alloy_primitives::bits::address::Address") ];
          discriminant := None;
        };
        {
          name := "AccountDestroyed";
          item :=
            StructRecord
              [
                ("address", Ty.path "alloy_primitives::bits::address::Address");
                ("target", Ty.path "alloy_primitives::bits::address::Address");
                ("was_destroyed", Ty.path "bool");
                ("had_balance",
                  Ty.apply
                    (Ty.path "ruint::Uint")
                    [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                    [])
              ];
          discriminant := None;
        };
        {
          name := "AccountTouched";
          item := StructRecord [ ("address", Ty.path "alloy_primitives::bits::address::Address") ];
          discriminant := None;
        };
        {
          name := "BalanceTransfer";
          item :=
            StructRecord
              [
                ("from", Ty.path "alloy_primitives::bits::address::Address");
                ("to", Ty.path "alloy_primitives::bits::address::Address");
                ("balance",
                  Ty.apply
                    (Ty.path "ruint::Uint")
                    [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                    [])
              ];
          discriminant := None;
        };
        {
          name := "NonceChange";
          item := StructRecord [ ("address", Ty.path "alloy_primitives::bits::address::Address") ];
          discriminant := None;
        };
        {
          name := "AccountCreated";
          item := StructRecord [ ("address", Ty.path "alloy_primitives::bits::address::Address") ];
          discriminant := None;
        };
        {
          name := "StorageChange";
          item :=
            StructRecord
              [
                ("address", Ty.path "alloy_primitives::bits::address::Address");
                ("key",
                  Ty.apply
                    (Ty.path "ruint::Uint")
                    [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                    []);
                ("had_value",
                  Ty.apply
                    (Ty.path "core::option::Option")
                    []
                    [
                      Ty.apply
                        (Ty.path "ruint::Uint")
                        [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                        []
                    ])
              ];
          discriminant := None;
        };
        {
          name := "TransientStorageChange";
          item :=
            StructRecord
              [
                ("address", Ty.path "alloy_primitives::bits::address::Address");
                ("key",
                  Ty.apply
                    (Ty.path "ruint::Uint")
                    [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                    []);
                ("had_value",
                  Ty.apply
                    (Ty.path "ruint::Uint")
                    [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4 ]
                    [])
              ];
          discriminant := None;
        };
        {
          name := "CodeChange";
          item := StructRecord [ ("address", Ty.path "alloy_primitives::bits::address::Address") ];
          discriminant := None;
        }
      ];
  }
  *)
  
  Module Impl_core_fmt_Debug_for_revm_journaled_state_JournalEntry.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournalEntry".
    
    (* 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 (|
            M.match_operator (|
              self,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountLoaded",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_struct_field1_finish",
                          []
                        |),
                        [
                          M.read (| f |);
                          M.read (| Value.String "AccountLoaded" |);
                          M.read (| Value.String "address" |);
                          __self_0
                        ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountDestroyed",
                        "address"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountDestroyed",
                        "target"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountDestroyed",
                        "was_destroyed"
                      |) in
                    let γ1_3 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountDestroyed",
                        "had_balance"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    let __self_1 := M.alloc (| γ1_1 |) in
                    let __self_2 := M.alloc (| γ1_2 |) in
                    let __self_3 := M.alloc (| γ1_3 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_struct_field4_finish",
                          []
                        |),
                        [
                          M.read (| f |);
                          M.read (| Value.String "AccountDestroyed" |);
                          M.read (| Value.String "address" |);
                          M.read (| __self_0 |);
                          M.read (| Value.String "target" |);
                          M.read (| __self_1 |);
                          M.read (| Value.String "was_destroyed" |);
                          M.read (| __self_2 |);
                          M.read (| Value.String "had_balance" |);
                          __self_3
                        ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountTouched",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_struct_field1_finish",
                          []
                        |),
                        [
                          M.read (| f |);
                          M.read (| Value.String "AccountTouched" |);
                          M.read (| Value.String "address" |);
                          __self_0
                        ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::BalanceTransfer",
                        "from"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::BalanceTransfer",
                        "to"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::BalanceTransfer",
                        "balance"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    let __self_1 := M.alloc (| γ1_1 |) in
                    let __self_2 := M.alloc (| γ1_2 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_struct_field3_finish",
                          []
                        |),
                        [
                          M.read (| f |);
                          M.read (| Value.String "BalanceTransfer" |);
                          M.read (| Value.String "from" |);
                          M.read (| __self_0 |);
                          M.read (| Value.String "to" |);
                          M.read (| __self_1 |);
                          M.read (| Value.String "balance" |);
                          __self_2
                        ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::NonceChange",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_struct_field1_finish",
                          []
                        |),
                        [
                          M.read (| f |);
                          M.read (| Value.String "NonceChange" |);
                          M.read (| Value.String "address" |);
                          __self_0
                        ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountCreated",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_struct_field1_finish",
                          []
                        |),
                        [
                          M.read (| f |);
                          M.read (| Value.String "AccountCreated" |);
                          M.read (| Value.String "address" |);
                          __self_0
                        ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::StorageChange",
                        "address"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::StorageChange",
                        "key"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::StorageChange",
                        "had_value"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    let __self_1 := M.alloc (| γ1_1 |) in
                    let __self_2 := M.alloc (| γ1_2 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_struct_field3_finish",
                          []
                        |),
                        [
                          M.read (| f |);
                          M.read (| Value.String "StorageChange" |);
                          M.read (| Value.String "address" |);
                          M.read (| __self_0 |);
                          M.read (| Value.String "key" |);
                          M.read (| __self_1 |);
                          M.read (| Value.String "had_value" |);
                          __self_2
                        ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::TransientStorageChange",
                        "address"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::TransientStorageChange",
                        "key"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::TransientStorageChange",
                        "had_value"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    let __self_1 := M.alloc (| γ1_1 |) in
                    let __self_2 := M.alloc (| γ1_2 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_struct_field3_finish",
                          []
                        |),
                        [
                          M.read (| f |);
                          M.read (| Value.String "TransientStorageChange" |);
                          M.read (| Value.String "address" |);
                          M.read (| __self_0 |);
                          M.read (| Value.String "key" |);
                          M.read (| __self_1 |);
                          M.read (| Value.String "had_value" |);
                          __self_2
                        ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::CodeChange",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_struct_field1_finish",
                          []
                        |),
                        [
                          M.read (| f |);
                          M.read (| Value.String "CodeChange" |);
                          M.read (| Value.String "address" |);
                          __self_0
                        ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => 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_journaled_state_JournalEntry.
  
  Module Impl_core_clone_Clone_for_revm_journaled_state_JournalEntry.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournalEntry".
    
    (* 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
          M.read (|
            M.match_operator (|
              self,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountLoaded",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      Value.StructRecord
                        "revm::journaled_state::JournalEntry::AccountLoaded"
                        [
                          ("address",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "alloy_primitives::bits::address::Address",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_0 |) ]
                            |))
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountDestroyed",
                        "address"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountDestroyed",
                        "target"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountDestroyed",
                        "was_destroyed"
                      |) in
                    let γ1_3 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountDestroyed",
                        "had_balance"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    let __self_1 := M.alloc (| γ1_1 |) in
                    let __self_2 := M.alloc (| γ1_2 |) in
                    let __self_3 := M.alloc (| γ1_3 |) in
                    M.alloc (|
                      Value.StructRecord
                        "revm::journaled_state::JournalEntry::AccountDestroyed"
                        [
                          ("address",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "alloy_primitives::bits::address::Address",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_0 |) ]
                            |));
                          ("target",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "alloy_primitives::bits::address::Address",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_1 |) ]
                            |));
                          ("was_destroyed",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "bool",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_2 |) ]
                            |));
                          ("had_balance",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.apply
                                  (Ty.path "ruint::Uint")
                                  [
                                    Value.Integer IntegerKind.Usize 256;
                                    Value.Integer IntegerKind.Usize 4
                                  ]
                                  [],
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_3 |) ]
                            |))
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountTouched",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      Value.StructRecord
                        "revm::journaled_state::JournalEntry::AccountTouched"
                        [
                          ("address",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "alloy_primitives::bits::address::Address",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_0 |) ]
                            |))
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::BalanceTransfer",
                        "from"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::BalanceTransfer",
                        "to"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::BalanceTransfer",
                        "balance"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    let __self_1 := M.alloc (| γ1_1 |) in
                    let __self_2 := M.alloc (| γ1_2 |) in
                    M.alloc (|
                      Value.StructRecord
                        "revm::journaled_state::JournalEntry::BalanceTransfer"
                        [
                          ("from",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "alloy_primitives::bits::address::Address",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_0 |) ]
                            |));
                          ("to",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "alloy_primitives::bits::address::Address",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_1 |) ]
                            |));
                          ("balance",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.apply
                                  (Ty.path "ruint::Uint")
                                  [
                                    Value.Integer IntegerKind.Usize 256;
                                    Value.Integer IntegerKind.Usize 4
                                  ]
                                  [],
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_2 |) ]
                            |))
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::NonceChange",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      Value.StructRecord
                        "revm::journaled_state::JournalEntry::NonceChange"
                        [
                          ("address",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "alloy_primitives::bits::address::Address",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_0 |) ]
                            |))
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountCreated",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      Value.StructRecord
                        "revm::journaled_state::JournalEntry::AccountCreated"
                        [
                          ("address",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "alloy_primitives::bits::address::Address",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_0 |) ]
                            |))
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::StorageChange",
                        "address"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::StorageChange",
                        "key"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::StorageChange",
                        "had_value"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    let __self_1 := M.alloc (| γ1_1 |) in
                    let __self_2 := M.alloc (| γ1_2 |) in
                    M.alloc (|
                      Value.StructRecord
                        "revm::journaled_state::JournalEntry::StorageChange"
                        [
                          ("address",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "alloy_primitives::bits::address::Address",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_0 |) ]
                            |));
                          ("key",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.apply
                                  (Ty.path "ruint::Uint")
                                  [
                                    Value.Integer IntegerKind.Usize 256;
                                    Value.Integer IntegerKind.Usize 4
                                  ]
                                  [],
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_1 |) ]
                            |));
                          ("had_value",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.apply
                                  (Ty.path "core::option::Option")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "ruint::Uint")
                                      [
                                        Value.Integer IntegerKind.Usize 256;
                                        Value.Integer IntegerKind.Usize 4
                                      ]
                                      []
                                  ],
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_2 |) ]
                            |))
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::TransientStorageChange",
                        "address"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::TransientStorageChange",
                        "key"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::TransientStorageChange",
                        "had_value"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    let __self_1 := M.alloc (| γ1_1 |) in
                    let __self_2 := M.alloc (| γ1_2 |) in
                    M.alloc (|
                      Value.StructRecord
                        "revm::journaled_state::JournalEntry::TransientStorageChange"
                        [
                          ("address",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "alloy_primitives::bits::address::Address",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_0 |) ]
                            |));
                          ("key",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.apply
                                  (Ty.path "ruint::Uint")
                                  [
                                    Value.Integer IntegerKind.Usize 256;
                                    Value.Integer IntegerKind.Usize 4
                                  ]
                                  [],
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_1 |) ]
                            |));
                          ("had_value",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.apply
                                  (Ty.path "ruint::Uint")
                                  [
                                    Value.Integer IntegerKind.Usize 256;
                                    Value.Integer IntegerKind.Usize 4
                                  ]
                                  [],
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_2 |) ]
                            |))
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::CodeChange",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      Value.StructRecord
                        "revm::journaled_state::JournalEntry::CodeChange"
                        [
                          ("address",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "alloy_primitives::bits::address::Address",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| __self_0 |) ]
                            |))
                        ]
                    |)))
              ]
            |)
          |)))
      | _, _, _ => 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_journaled_state_JournalEntry.
  
  Module Impl_core_marker_StructuralPartialEq_for_revm_journaled_state_JournalEntry.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournalEntry".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_revm_journaled_state_JournalEntry.
  
  Module Impl_core_cmp_PartialEq_for_revm_journaled_state_JournalEntry.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournalEntry".
    
    (* 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
          M.read (|
            let~ __self_discr :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (|
                    "core::intrinsics::discriminant_value",
                    [ Ty.path "revm::journaled_state::JournalEntry" ]
                  |),
                  [ M.read (| self |) ]
                |)
              |) in
            let~ __arg1_discr :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (|
                    "core::intrinsics::discriminant_value",
                    [ Ty.path "revm::journaled_state::JournalEntry" ]
                  |),
                  [ M.read (| other |) ]
                |)
              |) in
            M.alloc (|
              LogicalOp.and (|
                BinOp.eq (| M.read (| __self_discr |), M.read (| __arg1_discr |) |),
                ltac:(M.monadic
                  (M.read (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |),
                      [
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::AccountLoaded",
                                "address"
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::AccountLoaded",
                                "address"
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply
                                    (Ty.path "&")
                                    []
                                    [ Ty.path "alloy_primitives::bits::address::Address" ],
                                  [
                                    Ty.apply
                                      (Ty.path "&")
                                      []
                                      [ Ty.path "alloy_primitives::bits::address::Address" ]
                                  ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::AccountDestroyed",
                                "address"
                              |) in
                            let γ2_1 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::AccountDestroyed",
                                "target"
                              |) in
                            let γ2_2 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::AccountDestroyed",
                                "was_destroyed"
                              |) in
                            let γ2_3 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::AccountDestroyed",
                                "had_balance"
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let __self_1 := M.alloc (| γ2_1 |) in
                            let __self_2 := M.alloc (| γ2_2 |) in
                            let __self_3 := M.alloc (| γ2_3 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::AccountDestroyed",
                                "address"
                              |) in
                            let γ2_1 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::AccountDestroyed",
                                "target"
                              |) in
                            let γ2_2 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::AccountDestroyed",
                                "was_destroyed"
                              |) in
                            let γ2_3 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::AccountDestroyed",
                                "had_balance"
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            let __arg1_1 := M.alloc (| γ2_1 |) in
                            let __arg1_2 := M.alloc (| γ2_2 |) in
                            let __arg1_3 := M.alloc (| γ2_3 |) in
                            M.alloc (|
                              LogicalOp.and (|
                                LogicalOp.and (|
                                  LogicalOp.and (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::cmp::PartialEq",
                                        Ty.apply
                                          (Ty.path "&")
                                          []
                                          [ Ty.path "alloy_primitives::bits::address::Address" ],
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            []
                                            [ Ty.path "alloy_primitives::bits::address::Address" ]
                                        ],
                                        "eq",
                                        []
                                      |),
                                      [ __self_0; __arg1_0 ]
                                    |),
                                    ltac:(M.monadic
                                      (M.call_closure (|
                                        M.get_trait_method (|
                                          "core::cmp::PartialEq",
                                          Ty.apply
                                            (Ty.path "&")
                                            []
                                            [ Ty.path "alloy_primitives::bits::address::Address" ],
                                          [
                                            Ty.apply
                                              (Ty.path "&")
                                              []
                                              [ Ty.path "alloy_primitives::bits::address::Address" ]
                                          ],
                                          "eq",
                                          []
                                        |),
                                        [ __self_1; __arg1_1 ]
                                      |)))
                                  |),
                                  ltac:(M.monadic
                                    (M.call_closure (|
                                      M.get_trait_method (|
                                        "core::cmp::PartialEq",
                                        Ty.apply (Ty.path "&") [] [ Ty.path "bool" ],
                                        [ Ty.apply (Ty.path "&") [] [ Ty.path "bool" ] ],
                                        "eq",
                                        []
                                      |),
                                      [ __self_2; __arg1_2 ]
                                    |)))
                                |),
                                ltac:(M.monadic
                                  (M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.apply
                                        (Ty.path "&")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "ruint::Uint")
                                            [
                                              Value.Integer IntegerKind.Usize 256;
                                              Value.Integer IntegerKind.Usize 4
                                            ]
                                            []
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "&")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "ruint::Uint")
                                              [
                                                Value.Integer IntegerKind.Usize 256;
                                                Value.Integer IntegerKind.Usize 4
                                              ]
                                              []
                                          ]
                                      ],
                                      "eq",
                                      []
                                    |),
                                    [ __self_3; __arg1_3 ]
                                  |)))
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::AccountTouched",
                                "address"
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::AccountTouched",
                                "address"
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply
                                    (Ty.path "&")
                                    []
                                    [ Ty.path "alloy_primitives::bits::address::Address" ],
                                  [
                                    Ty.apply
                                      (Ty.path "&")
                                      []
                                      [ Ty.path "alloy_primitives::bits::address::Address" ]
                                  ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::BalanceTransfer",
                                "from"
                              |) in
                            let γ2_1 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::BalanceTransfer",
                                "to"
                              |) in
                            let γ2_2 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::BalanceTransfer",
                                "balance"
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let __self_1 := M.alloc (| γ2_1 |) in
                            let __self_2 := M.alloc (| γ2_2 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::BalanceTransfer",
                                "from"
                              |) in
                            let γ2_1 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::BalanceTransfer",
                                "to"
                              |) in
                            let γ2_2 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::BalanceTransfer",
                                "balance"
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            let __arg1_1 := M.alloc (| γ2_1 |) in
                            let __arg1_2 := M.alloc (| γ2_2 |) in
                            M.alloc (|
                              LogicalOp.and (|
                                LogicalOp.and (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.apply
                                        (Ty.path "&")
                                        []
                                        [ Ty.path "alloy_primitives::bits::address::Address" ],
                                      [
                                        Ty.apply
                                          (Ty.path "&")
                                          []
                                          [ Ty.path "alloy_primitives::bits::address::Address" ]
                                      ],
                                      "eq",
                                      []
                                    |),
                                    [ __self_0; __arg1_0 ]
                                  |),
                                  ltac:(M.monadic
                                    (M.call_closure (|
                                      M.get_trait_method (|
                                        "core::cmp::PartialEq",
                                        Ty.apply
                                          (Ty.path "&")
                                          []
                                          [ Ty.path "alloy_primitives::bits::address::Address" ],
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            []
                                            [ Ty.path "alloy_primitives::bits::address::Address" ]
                                        ],
                                        "eq",
                                        []
                                      |),
                                      [ __self_1; __arg1_1 ]
                                    |)))
                                |),
                                ltac:(M.monadic
                                  (M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.apply
                                        (Ty.path "&")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "ruint::Uint")
                                            [
                                              Value.Integer IntegerKind.Usize 256;
                                              Value.Integer IntegerKind.Usize 4
                                            ]
                                            []
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "&")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "ruint::Uint")
                                              [
                                                Value.Integer IntegerKind.Usize 256;
                                                Value.Integer IntegerKind.Usize 4
                                              ]
                                              []
                                          ]
                                      ],
                                      "eq",
                                      []
                                    |),
                                    [ __self_2; __arg1_2 ]
                                  |)))
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::NonceChange",
                                "address"
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::NonceChange",
                                "address"
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply
                                    (Ty.path "&")
                                    []
                                    [ Ty.path "alloy_primitives::bits::address::Address" ],
                                  [
                                    Ty.apply
                                      (Ty.path "&")
                                      []
                                      [ Ty.path "alloy_primitives::bits::address::Address" ]
                                  ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::AccountCreated",
                                "address"
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::AccountCreated",
                                "address"
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply
                                    (Ty.path "&")
                                    []
                                    [ Ty.path "alloy_primitives::bits::address::Address" ],
                                  [
                                    Ty.apply
                                      (Ty.path "&")
                                      []
                                      [ Ty.path "alloy_primitives::bits::address::Address" ]
                                  ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::StorageChange",
                                "address"
                              |) in
                            let γ2_1 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::StorageChange",
                                "key"
                              |) in
                            let γ2_2 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::StorageChange",
                                "had_value"
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let __self_1 := M.alloc (| γ2_1 |) in
                            let __self_2 := M.alloc (| γ2_2 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::StorageChange",
                                "address"
                              |) in
                            let γ2_1 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::StorageChange",
                                "key"
                              |) in
                            let γ2_2 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::StorageChange",
                                "had_value"
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            let __arg1_1 := M.alloc (| γ2_1 |) in
                            let __arg1_2 := M.alloc (| γ2_2 |) in
                            M.alloc (|
                              LogicalOp.and (|
                                LogicalOp.and (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.apply
                                        (Ty.path "&")
                                        []
                                        [ Ty.path "alloy_primitives::bits::address::Address" ],
                                      [
                                        Ty.apply
                                          (Ty.path "&")
                                          []
                                          [ Ty.path "alloy_primitives::bits::address::Address" ]
                                      ],
                                      "eq",
                                      []
                                    |),
                                    [ __self_0; __arg1_0 ]
                                  |),
                                  ltac:(M.monadic
                                    (M.call_closure (|
                                      M.get_trait_method (|
                                        "core::cmp::PartialEq",
                                        Ty.apply
                                          (Ty.path "&")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "ruint::Uint")
                                              [
                                                Value.Integer IntegerKind.Usize 256;
                                                Value.Integer IntegerKind.Usize 4
                                              ]
                                              []
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            []
                                            [
                                              Ty.apply
                                                (Ty.path "ruint::Uint")
                                                [
                                                  Value.Integer IntegerKind.Usize 256;
                                                  Value.Integer IntegerKind.Usize 4
                                                ]
                                                []
                                            ]
                                        ],
                                        "eq",
                                        []
                                      |),
                                      [ __self_1; __arg1_1 ]
                                    |)))
                                |),
                                ltac:(M.monadic
                                  (M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.apply
                                        (Ty.path "&")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "core::option::Option")
                                            []
                                            [
                                              Ty.apply
                                                (Ty.path "ruint::Uint")
                                                [
                                                  Value.Integer IntegerKind.Usize 256;
                                                  Value.Integer IntegerKind.Usize 4
                                                ]
                                                []
                                            ]
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "&")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "core::option::Option")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "ruint::Uint")
                                                  [
                                                    Value.Integer IntegerKind.Usize 256;
                                                    Value.Integer IntegerKind.Usize 4
                                                  ]
                                                  []
                                              ]
                                          ]
                                      ],
                                      "eq",
                                      []
                                    |),
                                    [ __self_2; __arg1_2 ]
                                  |)))
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::TransientStorageChange",
                                "address"
                              |) in
                            let γ2_1 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::TransientStorageChange",
                                "key"
                              |) in
                            let γ2_2 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::TransientStorageChange",
                                "had_value"
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let __self_1 := M.alloc (| γ2_1 |) in
                            let __self_2 := M.alloc (| γ2_2 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::TransientStorageChange",
                                "address"
                              |) in
                            let γ2_1 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::TransientStorageChange",
                                "key"
                              |) in
                            let γ2_2 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::TransientStorageChange",
                                "had_value"
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            let __arg1_1 := M.alloc (| γ2_1 |) in
                            let __arg1_2 := M.alloc (| γ2_2 |) in
                            M.alloc (|
                              LogicalOp.and (|
                                LogicalOp.and (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.apply
                                        (Ty.path "&")
                                        []
                                        [ Ty.path "alloy_primitives::bits::address::Address" ],
                                      [
                                        Ty.apply
                                          (Ty.path "&")
                                          []
                                          [ Ty.path "alloy_primitives::bits::address::Address" ]
                                      ],
                                      "eq",
                                      []
                                    |),
                                    [ __self_0; __arg1_0 ]
                                  |),
                                  ltac:(M.monadic
                                    (M.call_closure (|
                                      M.get_trait_method (|
                                        "core::cmp::PartialEq",
                                        Ty.apply
                                          (Ty.path "&")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "ruint::Uint")
                                              [
                                                Value.Integer IntegerKind.Usize 256;
                                                Value.Integer IntegerKind.Usize 4
                                              ]
                                              []
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            []
                                            [
                                              Ty.apply
                                                (Ty.path "ruint::Uint")
                                                [
                                                  Value.Integer IntegerKind.Usize 256;
                                                  Value.Integer IntegerKind.Usize 4
                                                ]
                                                []
                                            ]
                                        ],
                                        "eq",
                                        []
                                      |),
                                      [ __self_1; __arg1_1 ]
                                    |)))
                                |),
                                ltac:(M.monadic
                                  (M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.apply
                                        (Ty.path "&")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "ruint::Uint")
                                            [
                                              Value.Integer IntegerKind.Usize 256;
                                              Value.Integer IntegerKind.Usize 4
                                            ]
                                            []
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "&")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "ruint::Uint")
                                              [
                                                Value.Integer IntegerKind.Usize 256;
                                                Value.Integer IntegerKind.Usize 4
                                              ]
                                              []
                                          ]
                                      ],
                                      "eq",
                                      []
                                    |),
                                    [ __self_2; __arg1_2 ]
                                  |)))
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_0,
                                "revm::journaled_state::JournalEntry::CodeChange",
                                "address"
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_record_field (|
                                γ0_1,
                                "revm::journaled_state::JournalEntry::CodeChange",
                                "address"
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply
                                    (Ty.path "&")
                                    []
                                    [ Ty.path "alloy_primitives::bits::address::Address" ],
                                  [
                                    Ty.apply
                                      (Ty.path "&")
                                      []
                                      [ Ty.path "alloy_primitives::bits::address::Address" ]
                                  ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (M.alloc (|
                              M.never_to_any (|
                                M.call_closure (|
                                  M.get_function (| "core::intrinsics::unreachable", [] |),
                                  []
                                |)
                              |)
                            |)))
                      ]
                    |)
                  |)))
              |)
            |)
          |)))
      | _, _, _ => 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_journaled_state_JournalEntry.
  
  Module Impl_core_cmp_Eq_for_revm_journaled_state_JournalEntry.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournalEntry".
    
    (* 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_journaled_state_JournalEntry.
  
  Module Impl_core_hash_Hash_for_revm_journaled_state_JournalEntry.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournalEntry".
    
    (* 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~ __self_discr :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (|
                    "core::intrinsics::discriminant_value",
                    [ Ty.path "revm::journaled_state::JournalEntry" ]
                  |),
                  [ M.read (| self |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_trait_method (| "core::hash::Hash", Ty.path "isize", [], "hash", [ __H ] |),
                  [ __self_discr; M.read (| state |) ]
                |)
              |) in
            M.match_operator (|
              self,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountLoaded",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::hash::Hash",
                          Ty.path "alloy_primitives::bits::address::Address",
                          [],
                          "hash",
                          [ __H ]
                        |),
                        [ M.read (| __self_0 |); M.read (| state |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountDestroyed",
                        "address"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountDestroyed",
                        "target"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountDestroyed",
                        "was_destroyed"
                      |) in
                    let γ1_3 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountDestroyed",
                        "had_balance"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    let __self_1 := M.alloc (| γ1_1 |) in
                    let __self_2 := M.alloc (| γ1_2 |) in
                    let __self_3 := M.alloc (| γ1_3 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::hash::Hash",
                            Ty.path "alloy_primitives::bits::address::Address",
                            [],
                            "hash",
                            [ __H ]
                          |),
                          [ M.read (| __self_0 |); M.read (| state |) ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::hash::Hash",
                            Ty.path "alloy_primitives::bits::address::Address",
                            [],
                            "hash",
                            [ __H ]
                          |),
                          [ M.read (| __self_1 |); M.read (| state |) ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::hash::Hash",
                            Ty.path "bool",
                            [],
                            "hash",
                            [ __H ]
                          |),
                          [ M.read (| __self_2 |); M.read (| state |) ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::hash::Hash",
                          Ty.apply
                            (Ty.path "ruint::Uint")
                            [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4
                            ]
                            [],
                          [],
                          "hash",
                          [ __H ]
                        |),
                        [ M.read (| __self_3 |); M.read (| state |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountTouched",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::hash::Hash",
                          Ty.path "alloy_primitives::bits::address::Address",
                          [],
                          "hash",
                          [ __H ]
                        |),
                        [ M.read (| __self_0 |); M.read (| state |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::BalanceTransfer",
                        "from"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::BalanceTransfer",
                        "to"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::BalanceTransfer",
                        "balance"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    let __self_1 := M.alloc (| γ1_1 |) in
                    let __self_2 := M.alloc (| γ1_2 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::hash::Hash",
                            Ty.path "alloy_primitives::bits::address::Address",
                            [],
                            "hash",
                            [ __H ]
                          |),
                          [ M.read (| __self_0 |); M.read (| state |) ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::hash::Hash",
                            Ty.path "alloy_primitives::bits::address::Address",
                            [],
                            "hash",
                            [ __H ]
                          |),
                          [ M.read (| __self_1 |); M.read (| state |) ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::hash::Hash",
                          Ty.apply
                            (Ty.path "ruint::Uint")
                            [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4
                            ]
                            [],
                          [],
                          "hash",
                          [ __H ]
                        |),
                        [ M.read (| __self_2 |); M.read (| state |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::NonceChange",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::hash::Hash",
                          Ty.path "alloy_primitives::bits::address::Address",
                          [],
                          "hash",
                          [ __H ]
                        |),
                        [ M.read (| __self_0 |); M.read (| state |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::AccountCreated",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::hash::Hash",
                          Ty.path "alloy_primitives::bits::address::Address",
                          [],
                          "hash",
                          [ __H ]
                        |),
                        [ M.read (| __self_0 |); M.read (| state |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::StorageChange",
                        "address"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::StorageChange",
                        "key"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::StorageChange",
                        "had_value"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    let __self_1 := M.alloc (| γ1_1 |) in
                    let __self_2 := M.alloc (| γ1_2 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::hash::Hash",
                            Ty.path "alloy_primitives::bits::address::Address",
                            [],
                            "hash",
                            [ __H ]
                          |),
                          [ M.read (| __self_0 |); M.read (| state |) ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::hash::Hash",
                            Ty.apply
                              (Ty.path "ruint::Uint")
                              [
                                Value.Integer IntegerKind.Usize 256;
                                Value.Integer IntegerKind.Usize 4
                              ]
                              [],
                            [],
                            "hash",
                            [ __H ]
                          |),
                          [ M.read (| __self_1 |); M.read (| state |) ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::hash::Hash",
                          Ty.apply
                            (Ty.path "core::option::Option")
                            []
                            [
                              Ty.apply
                                (Ty.path "ruint::Uint")
                                [
                                  Value.Integer IntegerKind.Usize 256;
                                  Value.Integer IntegerKind.Usize 4
                                ]
                                []
                            ],
                          [],
                          "hash",
                          [ __H ]
                        |),
                        [ M.read (| __self_2 |); M.read (| state |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::TransientStorageChange",
                        "address"
                      |) in
                    let γ1_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::TransientStorageChange",
                        "key"
                      |) in
                    let γ1_2 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::TransientStorageChange",
                        "had_value"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    let __self_1 := M.alloc (| γ1_1 |) in
                    let __self_2 := M.alloc (| γ1_2 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::hash::Hash",
                            Ty.path "alloy_primitives::bits::address::Address",
                            [],
                            "hash",
                            [ __H ]
                          |),
                          [ M.read (| __self_0 |); M.read (| state |) ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::hash::Hash",
                            Ty.apply
                              (Ty.path "ruint::Uint")
                              [
                                Value.Integer IntegerKind.Usize 256;
                                Value.Integer IntegerKind.Usize 4
                              ]
                              [],
                            [],
                            "hash",
                            [ __H ]
                          |),
                          [ M.read (| __self_1 |); M.read (| state |) ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::hash::Hash",
                          Ty.apply
                            (Ty.path "ruint::Uint")
                            [ Value.Integer IntegerKind.Usize 256; Value.Integer IntegerKind.Usize 4
                            ]
                            [],
                          [],
                          "hash",
                          [ __H ]
                        |),
                        [ M.read (| __self_2 |); M.read (| state |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "revm::journaled_state::JournalEntry::CodeChange",
                        "address"
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::hash::Hash",
                          Ty.path "alloy_primitives::bits::address::Address",
                          [],
                          "hash",
                          [ __H ]
                        |),
                        [ M.read (| __self_0 |); 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_journaled_state_JournalEntry.
  
  (* StructRecord
    {
      name := "JournalCheckpoint";
      const_params := [];
      ty_params := [];
      fields := [ ("log_i", Ty.path "usize"); ("journal_i", Ty.path "usize") ];
    } *)
  
  Module Impl_core_fmt_Debug_for_revm_journaled_state_JournalCheckpoint.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournalCheckpoint".
    
    (* 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.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_struct_field2_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "JournalCheckpoint" |);
              M.read (| Value.String "log_i" |);
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "revm::journaled_state::JournalCheckpoint",
                "log_i"
              |);
              M.read (| Value.String "journal_i" |);
              M.alloc (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "revm::journaled_state::JournalCheckpoint",
                  "journal_i"
                |)
              |)
            ]
          |)))
      | _, _, _ => 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_journaled_state_JournalCheckpoint.
  
  Module Impl_core_marker_Copy_for_revm_journaled_state_JournalCheckpoint.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournalCheckpoint".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_revm_journaled_state_JournalCheckpoint.
  
  Module Impl_core_clone_Clone_for_revm_journaled_state_JournalCheckpoint.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournalCheckpoint".
    
    (* 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
          M.read (|
            M.match_operator (|
              Value.DeclaredButUndefined,
              [ fun γ => ltac:(M.monadic (M.read (| self |))) ]
            |)
          |)))
      | _, _, _ => 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_journaled_state_JournalCheckpoint.
  
  Module Impl_core_marker_StructuralPartialEq_for_revm_journaled_state_JournalCheckpoint.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournalCheckpoint".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_revm_journaled_state_JournalCheckpoint.
  
  Module Impl_core_cmp_PartialEq_for_revm_journaled_state_JournalCheckpoint.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournalCheckpoint".
    
    (* 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 (|
            BinOp.eq (|
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "revm::journaled_state::JournalCheckpoint",
                  "log_i"
                |)
              |),
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| other |),
                  "revm::journaled_state::JournalCheckpoint",
                  "log_i"
                |)
              |)
            |),
            ltac:(M.monadic
              (BinOp.eq (|
                M.read (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "revm::journaled_state::JournalCheckpoint",
                    "journal_i"
                  |)
                |),
                M.read (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| other |),
                    "revm::journaled_state::JournalCheckpoint",
                    "journal_i"
                  |)
                |)
              |)))
          |)))
      | _, _, _ => 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_journaled_state_JournalCheckpoint.
  
  Module Impl_core_cmp_Eq_for_revm_journaled_state_JournalCheckpoint.
    Definition Self : Ty.t := Ty.path "revm::journaled_state::JournalCheckpoint".
    
    (* 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.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_journaled_state_JournalCheckpoint.
End journaled_state.
