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

Module fmt.
  (*
  Enum Alignment
  {
    const_params := [];
    ty_params := [];
    variants :=
      [
        {
          name := "Left";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "Right";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "Center";
          item := StructTuple [];
          discriminant := None;
        }
      ];
  }
  *)
  
  Module Impl_core_marker_Copy_for_core_fmt_Alignment.
    Definition Self : Ty.t := Ty.path "core::fmt::Alignment".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_core_fmt_Alignment.
  
  Module Impl_core_clone_Clone_for_core_fmt_Alignment.
    Definition Self : Ty.t := Ty.path "core::fmt::Alignment".
    
    (* 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.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_core_fmt_Alignment.
  
  Module Impl_core_fmt_Debug_for_core_fmt_Alignment.
    Definition Self : Ty.t := Ty.path "core::fmt::Alignment".
    
    (* 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", "write_str", [] |),
            [
              M.read (| f |);
              M.read (|
                M.match_operator (|
                  self,
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ := M.is_struct_tuple (| γ, "core::fmt::Alignment::Left" |) in
                        M.alloc (| M.read (| Value.String "Left" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ := M.is_struct_tuple (| γ, "core::fmt::Alignment::Right" |) in
                        M.alloc (| M.read (| Value.String "Right" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ := M.is_struct_tuple (| γ, "core::fmt::Alignment::Center" |) in
                        M.alloc (| M.read (| Value.String "Center" |) |)))
                  ]
                |)
              |)
            ]
          |)))
      | _, _, _ => 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_core_fmt_Alignment.
  
  Module Impl_core_marker_StructuralPartialEq_for_core_fmt_Alignment.
    Definition Self : Ty.t := Ty.path "core::fmt::Alignment".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_core_fmt_Alignment.
  
  Module Impl_core_cmp_PartialEq_for_core_fmt_Alignment.
    Definition Self : Ty.t := Ty.path "core::fmt::Alignment".
    
    (* 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 "core::fmt::Alignment" ]
                  |),
                  [ M.read (| self |) ]
                |)
              |) in
            let~ __arg1_discr :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (|
                    "core::intrinsics::discriminant_value",
                    [ Ty.path "core::fmt::Alignment" ]
                  |),
                  [ M.read (| other |) ]
                |)
              |) in
            M.alloc (| BinOp.eq (| M.read (| __self_discr |), M.read (| __arg1_discr |) |) |)
          |)))
      | _, _, _ => 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_core_fmt_Alignment.
  
  Module Impl_core_cmp_Eq_for_core_fmt_Alignment.
    Definition Self : Ty.t := Ty.path "core::fmt::Alignment".
    
    (* 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
          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_core_fmt_Alignment.
  
  Axiom Result :
    (Ty.path "core::fmt::Result") =
      (Ty.apply (Ty.path "core::result::Result") [] [ Ty.tuple []; Ty.path "core::fmt::Error" ]).
  
  (* StructTuple
    {
      name := "Error";
      const_params := [];
      ty_params := [];
      fields := [];
    } *)
  
  Module Impl_core_marker_Copy_for_core_fmt_Error.
    Definition Self : Ty.t := Ty.path "core::fmt::Error".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_core_fmt_Error.
  
  Module Impl_core_clone_Clone_for_core_fmt_Error.
    Definition Self : Ty.t := Ty.path "core::fmt::Error".
    
    (* 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.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_core_fmt_Error.
  
  Module Impl_core_fmt_Debug_for_core_fmt_Error.
    Definition Self : Ty.t := Ty.path "core::fmt::Error".
    
    (* 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", "write_str", [] |),
            [ M.read (| f |); M.read (| Value.String "Error" |) ]
          |)))
      | _, _, _ => 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_core_fmt_Error.
  
  Module Impl_core_default_Default_for_core_fmt_Error.
    Definition Self : Ty.t := Ty.path "core::fmt::Error".
    
    (* Default *)
    Definition default (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [] => ltac:(M.monadic (Value.StructTuple "core::fmt::Error" []))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::default::Default"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("default", InstanceField.Method default) ].
  End Impl_core_default_Default_for_core_fmt_Error.
  
  Module Impl_core_cmp_Eq_for_core_fmt_Error.
    Definition Self : Ty.t := Ty.path "core::fmt::Error".
    
    (* 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
          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_core_fmt_Error.
  
  Module Impl_core_hash_Hash_for_core_fmt_Error.
    Definition Self : Ty.t := Ty.path "core::fmt::Error".
    
    (* 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
          Value.Tuple []))
      | _, _, _ => 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_core_fmt_Error.
  
  Module Impl_core_cmp_Ord_for_core_fmt_Error.
    Definition Self : Ty.t := Ty.path "core::fmt::Error".
    
    (* Ord *)
    Definition cmp (ε : 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
          Value.StructTuple "core::cmp::Ordering::Equal" []))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::Ord"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("cmp", InstanceField.Method cmp) ].
  End Impl_core_cmp_Ord_for_core_fmt_Error.
  
  Module Impl_core_marker_StructuralPartialEq_for_core_fmt_Error.
    Definition Self : Ty.t := Ty.path "core::fmt::Error".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_core_fmt_Error.
  
  Module Impl_core_cmp_PartialEq_for_core_fmt_Error.
    Definition Self : Ty.t := Ty.path "core::fmt::Error".
    
    (* 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
          Value.Bool true))
      | _, _, _ => 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_core_fmt_Error.
  
  Module Impl_core_cmp_PartialOrd_for_core_fmt_Error.
    Definition Self : Ty.t := Ty.path "core::fmt::Error".
    
    (* PartialOrd *)
    Definition partial_cmp (ε : 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
          Value.StructTuple
            "core::option::Option::Some"
            [ Value.StructTuple "core::cmp::Ordering::Equal" [] ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialOrd"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("partial_cmp", InstanceField.Method partial_cmp) ].
  End Impl_core_cmp_PartialOrd_for_core_fmt_Error.
  
  (* Trait *)
  Module Write.
    Definition write_char (Self : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; c ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let c := M.alloc (| c |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Write", Self, [], "write_str", [] |),
            [
              M.read (| self |);
              M.call_closure (|
                M.get_associated_function (| Ty.path "char", "encode_utf8", [] |),
                [
                  M.read (| c |);
                  M.alloc (|
                    repeat (| Value.Integer IntegerKind.U8 0, Value.Integer IntegerKind.Usize 4 |)
                  |)
                ]
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom ProvidedMethod_write_char : M.IsProvidedMethod "core::fmt::Write" "write_char" write_char.
    Definition write_fmt (Self : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; args ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let args := M.alloc (| args |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::fmt::Write::write_fmt::SpecWriteFmt",
              Ty.apply (Ty.path "&mut") [] [ Self ],
              [],
              "spec_write_fmt",
              []
            |),
            [ M.read (| self |); M.read (| args |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom ProvidedMethod_write_fmt : M.IsProvidedMethod "core::fmt::Write" "write_fmt" write_fmt.
  End Write.
  
  Module Impl_core_fmt_Write_where_core_fmt_Write_W_where_core_marker_Sized_W_for_ref_mut_W.
    Definition Self (W : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [] [ W ].
    
    (*
        fn write_str(&mut self, s: &str) -> Result {
            ( **self).write_str(s)
        }
    *)
    Definition write_str (W : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self W in
      match ε, τ, α with
      | [], [], [ self; s ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let s := M.alloc (| s |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Write", W, [], "write_str", [] |),
            [ M.read (| M.read (| self |) |); M.read (| s |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn write_char(&mut self, c: char) -> Result {
            ( **self).write_char(c)
        }
    *)
    Definition write_char (W : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self W in
      match ε, τ, α with
      | [], [], [ self; c ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let c := M.alloc (| c |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Write", W, [], "write_char", [] |),
            [ M.read (| M.read (| self |) |); M.read (| c |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn write_fmt(&mut self, args: Arguments<'_>) -> Result {
            ( **self).write_fmt(args)
        }
    *)
    Definition write_fmt (W : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self W in
      match ε, τ, α with
      | [], [], [ self; args ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let args := M.alloc (| args |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Write", W, [], "write_fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| args |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (W : Ty.t),
      M.IsTraitInstance
        "core::fmt::Write"
        (Self W)
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("write_str", InstanceField.Method (write_str W));
          ("write_char", InstanceField.Method (write_char W));
          ("write_fmt", InstanceField.Method (write_fmt W))
        ].
  End Impl_core_fmt_Write_where_core_fmt_Write_W_where_core_marker_Sized_W_for_ref_mut_W.
  
  (* StructRecord
    {
      name := "Formatter";
      const_params := [];
      ty_params := [];
      fields :=
        [
          ("flags", Ty.path "u32");
          ("fill", Ty.path "char");
          ("align", Ty.path "core::fmt::rt::Alignment");
          ("width", Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "usize" ]);
          ("precision", Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "usize" ]);
          ("buf", Ty.apply (Ty.path "&mut") [] [ Ty.dyn [ ("core::fmt::Write::Trait", []) ] ])
        ];
    } *)
  
  Module Impl_core_fmt_Formatter.
    Definition Self : Ty.t := Ty.path "core::fmt::Formatter".
    
    (*
        pub fn new(buf: &'a mut (dyn Write + 'a)) -> Formatter<'a> {
            Formatter {
                flags: 0,
                fill: ' ',
                align: rt::Alignment::Unknown,
                width: None,
                precision: None,
                buf,
            }
        }
    *)
    Definition new (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ buf ] =>
        ltac:(M.monadic
          (let buf := M.alloc (| buf |) in
          Value.StructRecord
            "core::fmt::Formatter"
            [
              ("flags", Value.Integer IntegerKind.U32 0);
              ("fill", Value.UnicodeChar 32);
              ("align", Value.StructTuple "core::fmt::rt::Alignment::Unknown" []);
              ("width", Value.StructTuple "core::option::Option::None" []);
              ("precision", Value.StructTuple "core::option::Option::None" []);
              ("buf", M.read (| buf |))
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new.
    (*
        fn wrap_buf<'b, 'c, F>(&'b mut self, wrap: F) -> Formatter<'c>
        where
            'b: 'c,
            F: FnOnce(&'b mut (dyn Write + 'b)) -> &'c mut (dyn Write + 'c),
        {
            Formatter {
                // We want to change this
                buf: wrap(self.buf),
    
                // And preserve these
                flags: self.flags,
                fill: self.fill,
                align: self.align,
                width: self.width,
                precision: self.precision,
            }
        }
    *)
    Definition wrap_buf (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ F ], [ self; wrap ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let wrap := M.alloc (| wrap |) in
          Value.StructRecord
            "core::fmt::Formatter"
            [
              ("buf",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::ops::function::FnOnce",
                    F,
                    [
                      Ty.tuple
                        [
                          Ty.apply
                            (Ty.path "&mut")
                            []
                            [ Ty.dyn [ ("core::fmt::Write::Trait", []) ] ]
                        ]
                    ],
                    "call_once",
                    []
                  |),
                  [
                    M.read (| wrap |);
                    Value.Tuple
                      [
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "core::fmt::Formatter",
                            "buf"
                          |)
                        |)
                      ]
                  ]
                |));
              ("flags",
                M.read (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "core::fmt::Formatter",
                    "flags"
                  |)
                |));
              ("fill",
                M.read (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "core::fmt::Formatter",
                    "fill"
                  |)
                |));
              ("align",
                M.read (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "core::fmt::Formatter",
                    "align"
                  |)
                |));
              ("width",
                M.read (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "core::fmt::Formatter",
                    "width"
                  |)
                |));
              ("precision",
                M.read (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "core::fmt::Formatter",
                    "precision"
                  |)
                |))
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_wrap_buf : M.IsAssociatedFunction Self "wrap_buf" wrap_buf.
    
    (*
        pub fn pad_integral(&mut self, is_nonnegative: bool, prefix: &str, buf: &str) -> Result {
            let mut width = buf.len();
    
            let mut sign = None;
            if !is_nonnegative {
                sign = Some('-');
                width += 1;
            } else if self.sign_plus() {
                sign = Some('+');
                width += 1;
            }
    
            let prefix = if self.alternate() {
                width += prefix.chars().count();
                Some(prefix)
            } else {
                None
            };
    
            // Writes the sign if it exists, and then the prefix if it was requested
            #[inline(never)]
            fn write_prefix(f: &mut Formatter<'_>, sign: Option<char>, prefix: Option<&str>) -> Result {
                if let Some(c) = sign {
                    f.buf.write_char(c)?;
                }
                if let Some(prefix) = prefix { f.buf.write_str(prefix) } else { Ok(()) }
            }
    
            // The `width` field is more of a `min-width` parameter at this point.
            match self.width {
                // If there's no minimum length requirements then we can just
                // write the bytes.
                None => {
                    write_prefix(self, sign, prefix)?;
                    self.buf.write_str(buf)
                }
                // Check if we're over the minimum width, if so then we can also
                // just write the bytes.
                Some(min) if width >= min => {
                    write_prefix(self, sign, prefix)?;
                    self.buf.write_str(buf)
                }
                // The sign and prefix goes before the padding if the fill character
                // is zero
                Some(min) if self.sign_aware_zero_pad() => {
                    let old_fill = crate::mem::replace(&mut self.fill, '0');
                    let old_align = crate::mem::replace(&mut self.align, rt::Alignment::Right);
                    write_prefix(self, sign, prefix)?;
                    let post_padding = self.padding(min - width, Alignment::Right)?;
                    self.buf.write_str(buf)?;
                    post_padding.write(self)?;
                    self.fill = old_fill;
                    self.align = old_align;
                    Ok(())
                }
                // Otherwise, the sign and prefix goes after the padding
                Some(min) => {
                    let post_padding = self.padding(min - width, Alignment::Right)?;
                    write_prefix(self, sign, prefix)?;
                    self.buf.write_str(buf)?;
                    post_padding.write(self)
                }
            }
        }
    *)
    Definition pad_integral (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; is_nonnegative; prefix; buf ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let is_nonnegative := M.alloc (| is_nonnegative |) in
          let prefix := M.alloc (| prefix |) in
          let buf := M.alloc (| buf |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ width :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (| Ty.path "str", "len", [] |),
                      [ M.read (| buf |) ]
                    |)
                  |) in
                let~ sign := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use (M.alloc (| UnOp.not (| M.read (| is_nonnegative |) |) |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let~ _ :=
                            M.write (|
                              sign,
                              Value.StructTuple
                                "core::option::Option::Some"
                                [ Value.UnicodeChar 45 ]
                            |) in
                          let~ _ :=
                            let β := width in
                            M.write (|
                              β,
                              BinOp.Wrap.add (| M.read (| β |), Value.Integer IntegerKind.Usize 1 |)
                            |) in
                          M.alloc (| Value.Tuple [] |)));
                      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_associated_function (|
                                            Ty.path "core::fmt::Formatter",
                                            "sign_plus",
                                            []
                                          |),
                                          [ M.read (| self |) ]
                                        |)
                                      |)) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  let~ _ :=
                                    M.write (|
                                      sign,
                                      Value.StructTuple
                                        "core::option::Option::Some"
                                        [ Value.UnicodeChar 43 ]
                                    |) in
                                  let~ _ :=
                                    let β := width in
                                    M.write (|
                                      β,
                                      BinOp.Wrap.add (|
                                        M.read (| β |),
                                        Value.Integer IntegerKind.Usize 1
                                      |)
                                    |) in
                                  M.alloc (| Value.Tuple [] |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |)))
                    ]
                  |) in
                let~ prefix :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "core::fmt::Formatter",
                                      "alternate",
                                      []
                                    |),
                                    [ M.read (| self |) ]
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ _ :=
                              let β := width in
                              M.write (|
                                β,
                                BinOp.Wrap.add (|
                                  M.read (| β |),
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::traits::iterator::Iterator",
                                      Ty.path "core::str::iter::Chars",
                                      [],
                                      "count",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (| Ty.path "str", "chars", [] |),
                                        [ M.read (| prefix |) ]
                                      |)
                                    ]
                                  |)
                                |)
                              |) in
                            M.alloc (|
                              Value.StructTuple "core::option::Option::Some" [ M.read (| prefix |) ]
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (M.alloc (| Value.StructTuple "core::option::Option::None" [] |)))
                      ]
                    |)
                  |) in
                M.match_operator (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "core::fmt::Formatter",
                    "width"
                  |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) 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.path "core::fmt::Error" ],
                                  [],
                                  "branch",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Self,
                                      "write_prefix.pad_integral",
                                      []
                                    |),
                                    [ M.read (| self |); M.read (| sign |); M.read (| prefix |) ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::ops::control_flow::ControlFlow::Break",
                                      0
                                    |) in
                                  let residual := M.copy (| γ0_0 |) in
                                  M.alloc (|
                                    M.never_to_any (|
                                      M.read (|
                                        M.return_ (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::FromResidual",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                              [
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "core::convert::Infallible";
                                                    Ty.path "core::fmt::Error"
                                                  ]
                                              ],
                                              "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
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::fmt::Write",
                              Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                              [],
                              "write_str",
                              []
                            |),
                            [
                              M.read (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "core::fmt::Formatter",
                                  "buf"
                                |)
                              |);
                              M.read (| buf |)
                            ]
                          |)
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::option::Option::Some",
                            0
                          |) in
                        let min := M.copy (| γ0_0 |) in
                        let γ :=
                          M.alloc (| BinOp.ge (| M.read (| width |), M.read (| min |) |) |) in
                        let _ :=
                          M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) 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.path "core::fmt::Error" ],
                                  [],
                                  "branch",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Self,
                                      "write_prefix.pad_integral",
                                      []
                                    |),
                                    [ M.read (| self |); M.read (| sign |); M.read (| prefix |) ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::ops::control_flow::ControlFlow::Break",
                                      0
                                    |) in
                                  let residual := M.copy (| γ0_0 |) in
                                  M.alloc (|
                                    M.never_to_any (|
                                      M.read (|
                                        M.return_ (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::FromResidual",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                              [
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "core::convert::Infallible";
                                                    Ty.path "core::fmt::Error"
                                                  ]
                                              ],
                                              "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
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::fmt::Write",
                              Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                              [],
                              "write_str",
                              []
                            |),
                            [
                              M.read (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "core::fmt::Formatter",
                                  "buf"
                                |)
                              |);
                              M.read (| buf |)
                            ]
                          |)
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::option::Option::Some",
                            0
                          |) in
                        let min := M.copy (| γ0_0 |) in
                        let γ :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path "core::fmt::Formatter",
                                "sign_aware_zero_pad",
                                []
                              |),
                              [ M.read (| self |) ]
                            |)
                          |) in
                        let _ :=
                          M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                        let~ old_fill :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (| "core::mem::replace", [ Ty.path "char" ] |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "core::fmt::Formatter",
                                  "fill"
                                |);
                                Value.UnicodeChar 48
                              ]
                            |)
                          |) in
                        let~ old_align :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "core::mem::replace",
                                [ Ty.path "core::fmt::rt::Alignment" ]
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "core::fmt::Formatter",
                                  "align"
                                |);
                                Value.StructTuple "core::fmt::rt::Alignment::Right" []
                              ]
                            |)
                          |) 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.path "core::fmt::Error" ],
                                  [],
                                  "branch",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Self,
                                      "write_prefix.pad_integral",
                                      []
                                    |),
                                    [ M.read (| self |); M.read (| sign |); M.read (| prefix |) ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::ops::control_flow::ControlFlow::Break",
                                      0
                                    |) in
                                  let residual := M.copy (| γ0_0 |) in
                                  M.alloc (|
                                    M.never_to_any (|
                                      M.read (|
                                        M.return_ (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::FromResidual",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                              [
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "core::convert::Infallible";
                                                    Ty.path "core::fmt::Error"
                                                  ]
                                              ],
                                              "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~ post_padding :=
                          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 "core::fmt::PostPadding"; Ty.path "core::fmt::Error"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "core::fmt::Formatter",
                                        "padding",
                                        []
                                      |),
                                      [
                                        M.read (| self |);
                                        BinOp.Wrap.sub (| M.read (| min |), M.read (| width |) |);
                                        Value.StructTuple "core::fmt::Alignment::Right" []
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          M.return_ (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::try_trait::FromResidual",
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    []
                                                    [
                                                      Ty.path "core::convert::Infallible";
                                                      Ty.path "core::fmt::Error"
                                                    ]
                                                ],
                                                "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.path "core::fmt::Error" ],
                                  [],
                                  "branch",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::fmt::Write",
                                      Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                                      [],
                                      "write_str",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| self |),
                                          "core::fmt::Formatter",
                                          "buf"
                                        |)
                                      |);
                                      M.read (| buf |)
                                    ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::ops::control_flow::ControlFlow::Break",
                                      0
                                    |) in
                                  let residual := M.copy (| γ0_0 |) in
                                  M.alloc (|
                                    M.never_to_any (|
                                      M.read (|
                                        M.return_ (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::FromResidual",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                              [
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "core::convert::Infallible";
                                                    Ty.path "core::fmt::Error"
                                                  ]
                                              ],
                                              "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.path "core::fmt::Error" ],
                                  [],
                                  "branch",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "core::fmt::PostPadding",
                                      "write",
                                      []
                                    |),
                                    [ M.read (| post_padding |); M.read (| self |) ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::ops::control_flow::ControlFlow::Break",
                                      0
                                    |) in
                                  let residual := M.copy (| γ0_0 |) in
                                  M.alloc (|
                                    M.never_to_any (|
                                      M.read (|
                                        M.return_ (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::FromResidual",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                              [
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "core::convert::Infallible";
                                                    Ty.path "core::fmt::Error"
                                                  ]
                                              ],
                                              "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.read (| self |),
                              "core::fmt::Formatter",
                              "fill"
                            |),
                            M.read (| old_fill |)
                          |) in
                        let~ _ :=
                          M.write (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::fmt::Formatter",
                              "align"
                            |),
                            M.read (| old_align |)
                          |) in
                        M.alloc (|
                          Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::option::Option::Some",
                            0
                          |) in
                        let min := M.copy (| γ0_0 |) in
                        let~ post_padding :=
                          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 "core::fmt::PostPadding"; Ty.path "core::fmt::Error"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "core::fmt::Formatter",
                                        "padding",
                                        []
                                      |),
                                      [
                                        M.read (| self |);
                                        BinOp.Wrap.sub (| M.read (| min |), M.read (| width |) |);
                                        Value.StructTuple "core::fmt::Alignment::Right" []
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          M.return_ (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::try_trait::FromResidual",
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    []
                                                    [
                                                      Ty.path "core::convert::Infallible";
                                                      Ty.path "core::fmt::Error"
                                                    ]
                                                ],
                                                "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.path "core::fmt::Error" ],
                                  [],
                                  "branch",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Self,
                                      "write_prefix.pad_integral",
                                      []
                                    |),
                                    [ M.read (| self |); M.read (| sign |); M.read (| prefix |) ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::ops::control_flow::ControlFlow::Break",
                                      0
                                    |) in
                                  let residual := M.copy (| γ0_0 |) in
                                  M.alloc (|
                                    M.never_to_any (|
                                      M.read (|
                                        M.return_ (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::FromResidual",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                              [
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "core::convert::Infallible";
                                                    Ty.path "core::fmt::Error"
                                                  ]
                                              ],
                                              "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.path "core::fmt::Error" ],
                                  [],
                                  "branch",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::fmt::Write",
                                      Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                                      [],
                                      "write_str",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| self |),
                                          "core::fmt::Formatter",
                                          "buf"
                                        |)
                                      |);
                                      M.read (| buf |)
                                    ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::ops::control_flow::ControlFlow::Break",
                                      0
                                    |) in
                                  let residual := M.copy (| γ0_0 |) in
                                  M.alloc (|
                                    M.never_to_any (|
                                      M.read (|
                                        M.return_ (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::FromResidual",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                              [
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "core::convert::Infallible";
                                                    Ty.path "core::fmt::Error"
                                                  ]
                                              ],
                                              "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
                        M.alloc (|
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "core::fmt::PostPadding",
                              "write",
                              []
                            |),
                            [ M.read (| post_padding |); M.read (| self |) ]
                          |)
                        |)))
                  ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_pad_integral : M.IsAssociatedFunction Self "pad_integral" pad_integral.
    
    (*
        pub fn pad(&mut self, s: &str) -> Result {
            // Make sure there's a fast path up front
            if self.width.is_none() && self.precision.is_none() {
                return self.buf.write_str(s);
            }
            // The `precision` field can be interpreted as a `max-width` for the
            // string being formatted.
            let s = if let Some(max) = self.precision {
                // If our string is longer that the precision, then we must have
                // truncation. However other flags like `fill`, `width` and `align`
                // must act as always.
                if let Some((i, _)) = s.char_indices().nth(max) {
                    // LLVM here can't prove that `..i` won't panic `&s[..i]`, but
                    // we know that it can't panic. Use `get` + `unwrap_or` to avoid
                    // `unsafe` and otherwise don't emit any panic-related code
                    // here.
                    s.get(..i).unwrap_or(s)
                } else {
                    &s
                }
            } else {
                &s
            };
            // The `width` field is more of a `min-width` parameter at this point.
            match self.width {
                // If we're under the maximum length, and there's no minimum length
                // requirements, then we can just emit the string
                None => self.buf.write_str(s),
                Some(width) => {
                    let chars_count = s.chars().count();
                    // If we're under the maximum width, check if we're over the minimum
                    // width, if so it's as easy as just emitting the string.
                    if chars_count >= width {
                        self.buf.write_str(s)
                    }
                    // If we're under both the maximum and the minimum width, then fill
                    // up the minimum width with the specified string + some alignment.
                    else {
                        let align = Alignment::Left;
                        let post_padding = self.padding(width - chars_count, align)?;
                        self.buf.write_str(s)?;
                        post_padding.write(self)
                    }
                }
            }
        }
    *)
    Definition pad (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; s ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let s := M.alloc (| s |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                LogicalOp.and (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "core::option::Option")
                                        []
                                        [ Ty.path "usize" ],
                                      "is_none",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "core::fmt::Formatter",
                                        "width"
                                      |)
                                    ]
                                  |),
                                  ltac:(M.monadic
                                    (M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "core::option::Option")
                                          []
                                          [ Ty.path "usize" ],
                                        "is_none",
                                        []
                                      |),
                                      [
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| self |),
                                          "core::fmt::Formatter",
                                          "precision"
                                        |)
                                      ]
                                    |)))
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::fmt::Write",
                                      Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                                      [],
                                      "write_str",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| self |),
                                          "core::fmt::Formatter",
                                          "buf"
                                        |)
                                      |);
                                      M.read (| s |)
                                    ]
                                  |)
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let~ s :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.SubPointer.get_struct_record_field (|
                                M.read (| self |),
                                "core::fmt::Formatter",
                                "precision"
                              |) in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::option::Option::Some",
                                0
                              |) in
                            let max := M.copy (| γ0_0 |) in
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::iter::traits::iterator::Iterator",
                                            Ty.path "core::str::iter::CharIndices",
                                            [],
                                            "nth",
                                            []
                                          |),
                                          [
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "str",
                                                  "char_indices",
                                                  []
                                                |),
                                                [ M.read (| s |) ]
                                              |)
                                            |);
                                            M.read (| max |)
                                          ]
                                        |)
                                      |) in
                                    let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::option::Option::Some",
                                        0
                                      |) in
                                    let γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in
                                    let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in
                                    let i := M.copy (| γ1_0 |) in
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "core::option::Option")
                                            []
                                            [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ],
                                          "unwrap_or",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "str",
                                              "get",
                                              [
                                                Ty.apply
                                                  (Ty.path "core::ops::range::RangeTo")
                                                  []
                                                  [ Ty.path "usize" ]
                                              ]
                                            |),
                                            [
                                              M.read (| s |);
                                              Value.StructRecord
                                                "core::ops::range::RangeTo"
                                                [ ("end_", M.read (| i |)) ]
                                            ]
                                          |);
                                          M.read (| s |)
                                        ]
                                      |)
                                    |)));
                                fun γ => ltac:(M.monadic (M.alloc (| M.read (| s |) |)))
                              ]
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| M.read (| s |) |)))
                      ]
                    |)
                  |) in
                M.match_operator (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "core::fmt::Formatter",
                    "width"
                  |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::fmt::Write",
                              Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                              [],
                              "write_str",
                              []
                            |),
                            [
                              M.read (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "core::fmt::Formatter",
                                  "buf"
                                |)
                              |);
                              M.read (| s |)
                            ]
                          |)
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::option::Option::Some",
                            0
                          |) in
                        let width := M.copy (| γ0_0 |) in
                        let~ chars_count :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::iter::traits::iterator::Iterator",
                                Ty.path "core::str::iter::Chars",
                                [],
                                "count",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (| Ty.path "str", "chars", [] |),
                                  [ M.read (| s |) ]
                                |)
                              ]
                            |)
                          |) in
                        M.match_operator (|
                          M.alloc (| Value.Tuple [] |),
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let γ :=
                                  M.use
                                    (M.alloc (|
                                      BinOp.ge (| M.read (| chars_count |), M.read (| width |) |)
                                    |)) in
                                let _ :=
                                  M.is_constant_or_break_match (|
                                    M.read (| γ |),
                                    Value.Bool true
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::fmt::Write",
                                      Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                                      [],
                                      "write_str",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| self |),
                                          "core::fmt::Formatter",
                                          "buf"
                                        |)
                                      |);
                                      M.read (| s |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let~ align :=
                                  M.alloc (| Value.StructTuple "core::fmt::Alignment::Left" [] |) in
                                let~ post_padding :=
                                  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 "core::fmt::PostPadding";
                                                Ty.path "core::fmt::Error"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path "core::fmt::Formatter",
                                                "padding",
                                                []
                                              |),
                                              [
                                                M.read (| self |);
                                                BinOp.Wrap.sub (|
                                                  M.read (| width |),
                                                  M.read (| chars_count |)
                                                |);
                                                M.read (| align |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  M.return_ (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::FromResidual",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          []
                                                          [ Ty.tuple []; Ty.path "core::fmt::Error"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path "core::fmt::Error"
                                                            ]
                                                        ],
                                                        "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.path "core::fmt::Error" ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::fmt::Write",
                                              Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                                              [],
                                              "write_str",
                                              []
                                            |),
                                            [
                                              M.read (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| self |),
                                                  "core::fmt::Formatter",
                                                  "buf"
                                                |)
                                              |);
                                              M.read (| s |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::try_trait::FromResidual",
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                                      [
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          []
                                                          [
                                                            Ty.path "core::convert::Infallible";
                                                            Ty.path "core::fmt::Error"
                                                          ]
                                                      ],
                                                      "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
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "core::fmt::PostPadding",
                                      "write",
                                      []
                                    |),
                                    [ M.read (| post_padding |); M.read (| self |) ]
                                  |)
                                |)))
                          ]
                        |)))
                  ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_pad : M.IsAssociatedFunction Self "pad" pad.
    
    (*
        pub(crate) fn padding(
            &mut self,
            padding: usize,
            default: Alignment,
        ) -> result::Result<PostPadding, Error> {
            let align = match self.align {
                rt::Alignment::Unknown => default,
                rt::Alignment::Left => Alignment::Left,
                rt::Alignment::Right => Alignment::Right,
                rt::Alignment::Center => Alignment::Center,
            };
    
            let (pre_pad, post_pad) = match align {
                Alignment::Left => (0, padding),
                Alignment::Right => (padding, 0),
                Alignment::Center => (padding / 2, (padding + 1) / 2),
            };
    
            for _ in 0..pre_pad {
                self.buf.write_char(self.fill)?;
            }
    
            Ok(PostPadding::new(self.fill, post_pad))
        }
    *)
    Definition padding (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; padding; default ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let padding := M.alloc (| padding |) in
          let default := M.alloc (| default |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ align :=
                  M.copy (|
                    M.match_operator (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "core::fmt::Formatter",
                        "align"
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Unknown" |) in
                            default));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ := M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Left" |) in
                            M.alloc (| Value.StructTuple "core::fmt::Alignment::Left" [] |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Right" |) in
                            M.alloc (| Value.StructTuple "core::fmt::Alignment::Right" [] |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Center" |) in
                            M.alloc (| Value.StructTuple "core::fmt::Alignment::Center" [] |)))
                      ]
                    |)
                  |) in
                M.match_operator (|
                  M.match_operator (|
                    align,
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let _ := M.is_struct_tuple (| γ, "core::fmt::Alignment::Left" |) in
                          M.alloc (|
                            Value.Tuple [ Value.Integer IntegerKind.Usize 0; M.read (| padding |) ]
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ := M.is_struct_tuple (| γ, "core::fmt::Alignment::Right" |) in
                          M.alloc (|
                            Value.Tuple [ M.read (| padding |); Value.Integer IntegerKind.Usize 0 ]
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ := M.is_struct_tuple (| γ, "core::fmt::Alignment::Center" |) in
                          M.alloc (|
                            Value.Tuple
                              [
                                BinOp.Wrap.div (|
                                  M.read (| padding |),
                                  Value.Integer IntegerKind.Usize 2
                                |);
                                BinOp.Wrap.div (|
                                  BinOp.Wrap.add (|
                                    M.read (| padding |),
                                    Value.Integer IntegerKind.Usize 1
                                  |),
                                  Value.Integer IntegerKind.Usize 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 pre_pad := M.copy (| γ0_0 |) in
                        let post_pad := M.copy (| γ0_1 |) in
                        let~ _ :=
                          M.use
                            (M.match_operator (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::iter::traits::collect::IntoIterator",
                                    Ty.apply
                                      (Ty.path "core::ops::range::Range")
                                      []
                                      [ Ty.path "usize" ],
                                    [],
                                    "into_iter",
                                    []
                                  |),
                                  [
                                    Value.StructRecord
                                      "core::ops::range::Range"
                                      [
                                        ("start", Value.Integer IntegerKind.Usize 0);
                                        ("end_", M.read (| pre_pad |))
                                      ]
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let iter := M.copy (| γ |) in
                                    M.loop (|
                                      ltac:(M.monadic
                                        (let~ _ :=
                                          M.match_operator (|
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::iter::traits::iterator::Iterator",
                                                  Ty.apply
                                                    (Ty.path "core::ops::range::Range")
                                                    []
                                                    [ Ty.path "usize" ],
                                                  [],
                                                  "next",
                                                  []
                                                |),
                                                [ iter ]
                                              |)
                                            |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let _ :=
                                                    M.is_struct_tuple (|
                                                      γ,
                                                      "core::option::Option::None"
                                                    |) in
                                                  M.alloc (|
                                                    M.never_to_any (| M.read (| M.break (||) |) |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::option::Option::Some",
                                                      0
                                                    |) in
                                                  let~ _ :=
                                                    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.path "core::fmt::Error"
                                                              ],
                                                            [],
                                                            "branch",
                                                            []
                                                          |),
                                                          [
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "core::fmt::Write",
                                                                Ty.dyn
                                                                  [ ("core::fmt::Write::Trait", [])
                                                                  ],
                                                                [],
                                                                "write_char",
                                                                []
                                                              |),
                                                              [
                                                                M.read (|
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    M.read (| self |),
                                                                    "core::fmt::Formatter",
                                                                    "buf"
                                                                  |)
                                                                |);
                                                                M.read (|
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    M.read (| self |),
                                                                    "core::fmt::Formatter",
                                                                    "fill"
                                                                  |)
                                                                |)
                                                              ]
                                                            |)
                                                          ]
                                                        |)
                                                      |),
                                                      [
                                                        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
                                                                              "core::fmt::PostPadding";
                                                                            Ty.path
                                                                              "core::fmt::Error"
                                                                          ],
                                                                        [
                                                                          Ty.apply
                                                                            (Ty.path
                                                                              "core::result::Result")
                                                                            []
                                                                            [
                                                                              Ty.path
                                                                                "core::convert::Infallible";
                                                                              Ty.path
                                                                                "core::fmt::Error"
                                                                            ]
                                                                        ],
                                                                        "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
                                                  M.alloc (| Value.Tuple [] |)))
                                            ]
                                          |) in
                                        M.alloc (| Value.Tuple [] |)))
                                    |)))
                              ]
                            |)) in
                        M.alloc (|
                          Value.StructTuple
                            "core::result::Result::Ok"
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.path "core::fmt::PostPadding",
                                  "new",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "core::fmt::Formatter",
                                      "fill"
                                    |)
                                  |);
                                  M.read (| post_pad |)
                                ]
                              |)
                            ]
                        |)))
                  ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_padding : M.IsAssociatedFunction Self "padding" padding.
    
    (*
        unsafe fn pad_formatted_parts(&mut self, formatted: &numfmt::Formatted<'_>) -> Result {
            if let Some(mut width) = self.width {
                // for the sign-aware zero padding, we render the sign first and
                // behave as if we had no sign from the beginning.
                let mut formatted = formatted.clone();
                let old_fill = self.fill;
                let old_align = self.align;
                if self.sign_aware_zero_pad() {
                    // a sign always goes first
                    let sign = formatted.sign;
                    self.buf.write_str(sign)?;
    
                    // remove the sign from the formatted parts
                    formatted.sign = "";
                    width = width.saturating_sub(sign.len());
                    self.fill = '0';
                    self.align = rt::Alignment::Right;
                }
    
                // remaining parts go through the ordinary padding process.
                let len = formatted.len();
                let ret = if width <= len {
                    // no padding
                    // SAFETY: Per the precondition.
                    unsafe { self.write_formatted_parts(&formatted) }
                } else {
                    let post_padding = self.padding(width - len, Alignment::Right)?;
                    // SAFETY: Per the precondition.
                    unsafe {
                        self.write_formatted_parts(&formatted)?;
                    }
                    post_padding.write(self)
                };
                self.fill = old_fill;
                self.align = old_align;
                ret
            } else {
                // this is the common case and we take a shortcut
                // SAFETY: Per the precondition.
                unsafe { self.write_formatted_parts(formatted) }
            }
        }
    *)
    Definition pad_formatted_parts (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; formatted ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let formatted := M.alloc (| formatted |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ :=
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "core::fmt::Formatter",
                            "width"
                          |) in
                        let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::option::Option::Some",
                            0
                          |) in
                        let width := M.copy (| γ0_0 |) in
                        let~ formatted :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.path "core::num::fmt::Formatted",
                                [],
                                "clone",
                                []
                              |),
                              [ M.read (| formatted |) ]
                            |)
                          |) in
                        let~ old_fill :=
                          M.copy (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::fmt::Formatter",
                              "fill"
                            |)
                          |) in
                        let~ old_align :=
                          M.copy (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::fmt::Formatter",
                              "align"
                            |)
                          |) 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 "core::fmt::Formatter",
                                            "sign_aware_zero_pad",
                                            []
                                          |),
                                          [ M.read (| self |) ]
                                        |)
                                      |)) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  let~ sign :=
                                    M.copy (|
                                      M.SubPointer.get_struct_record_field (|
                                        formatted,
                                        "core::num::fmt::Formatted",
                                        "sign"
                                      |)
                                    |) 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.path "core::fmt::Error" ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::fmt::Write",
                                                Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                                                [],
                                                "write_str",
                                                []
                                              |),
                                              [
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| self |),
                                                    "core::fmt::Formatter",
                                                    "buf"
                                                  |)
                                                |);
                                                M.read (| sign |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  M.return_ (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::FromResidual",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          []
                                                          [ Ty.tuple []; Ty.path "core::fmt::Error"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path "core::fmt::Error"
                                                            ]
                                                        ],
                                                        "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 (|
                                        formatted,
                                        "core::num::fmt::Formatted",
                                        "sign"
                                      |),
                                      M.read (| Value.String "" |)
                                    |) in
                                  let~ _ :=
                                    M.write (|
                                      width,
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "usize",
                                          "saturating_sub",
                                          []
                                        |),
                                        [
                                          M.read (| width |);
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "str",
                                              "len",
                                              []
                                            |),
                                            [ M.read (| sign |) ]
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let~ _ :=
                                    M.write (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "core::fmt::Formatter",
                                        "fill"
                                      |),
                                      Value.UnicodeChar 48
                                    |) in
                                  let~ _ :=
                                    M.write (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "core::fmt::Formatter",
                                        "align"
                                      |),
                                      Value.StructTuple "core::fmt::rt::Alignment::Right" []
                                    |) in
                                  M.alloc (| Value.Tuple [] |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |) in
                        let~ len :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path "core::num::fmt::Formatted",
                                "len",
                                []
                              |),
                              [ formatted ]
                            |)
                          |) in
                        let~ ret :=
                          M.copy (|
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          BinOp.le (| M.read (| width |), M.read (| len |) |)
                                        |)) 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 "core::fmt::Formatter",
                                          "write_formatted_parts",
                                          []
                                        |),
                                        [ M.read (| self |); formatted ]
                                      |)
                                    |)));
                                fun γ =>
                                  ltac:(M.monadic
                                    (let~ post_padding :=
                                      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 "core::fmt::PostPadding";
                                                    Ty.path "core::fmt::Error"
                                                  ],
                                                [],
                                                "branch",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path "core::fmt::Formatter",
                                                    "padding",
                                                    []
                                                  |),
                                                  [
                                                    M.read (| self |);
                                                    BinOp.Wrap.sub (|
                                                      M.read (| width |),
                                                      M.read (| len |)
                                                    |);
                                                    Value.StructTuple
                                                      "core::fmt::Alignment::Right"
                                                      []
                                                  ]
                                                |)
                                              ]
                                            |)
                                          |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::ops::control_flow::ControlFlow::Break",
                                                    0
                                                  |) in
                                                let residual := M.copy (| γ0_0 |) in
                                                M.alloc (|
                                                  M.never_to_any (|
                                                    M.read (|
                                                      M.return_ (|
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::ops::try_trait::FromResidual",
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              []
                                                              [
                                                                Ty.tuple [];
                                                                Ty.path "core::fmt::Error"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                []
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path "core::fmt::Error"
                                                                ]
                                                            ],
                                                            "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~ _ :=
                                      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.path "core::fmt::Error" ],
                                                [],
                                                "branch",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path "core::fmt::Formatter",
                                                    "write_formatted_parts",
                                                    []
                                                  |),
                                                  [ M.read (| self |); formatted ]
                                                |)
                                              ]
                                            |)
                                          |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::ops::control_flow::ControlFlow::Break",
                                                    0
                                                  |) in
                                                let residual := M.copy (| γ0_0 |) in
                                                M.alloc (|
                                                  M.never_to_any (|
                                                    M.read (|
                                                      M.return_ (|
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::ops::try_trait::FromResidual",
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              []
                                                              [
                                                                Ty.tuple [];
                                                                Ty.path "core::fmt::Error"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                []
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path "core::fmt::Error"
                                                                ]
                                                            ],
                                                            "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
                                      M.alloc (| Value.Tuple [] |) in
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "core::fmt::PostPadding",
                                          "write",
                                          []
                                        |),
                                        [ M.read (| post_padding |); M.read (| self |) ]
                                      |)
                                    |)))
                              ]
                            |)
                          |) in
                        let~ _ :=
                          M.write (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::fmt::Formatter",
                              "fill"
                            |),
                            M.read (| old_fill |)
                          |) in
                        let~ _ :=
                          M.write (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::fmt::Formatter",
                              "align"
                            |),
                            M.read (| old_align |)
                          |) in
                        ret));
                    fun γ =>
                      ltac:(M.monadic
                        (M.alloc (|
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "core::fmt::Formatter",
                              "write_formatted_parts",
                              []
                            |),
                            [ M.read (| self |); M.read (| formatted |) ]
                          |)
                        |)))
                  ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_pad_formatted_parts :
      M.IsAssociatedFunction Self "pad_formatted_parts" pad_formatted_parts.
    
    (*
        unsafe fn write_formatted_parts(&mut self, formatted: &numfmt::Formatted<'_>) -> Result {
            unsafe fn write_bytes(buf: &mut dyn Write, s: &[u8]) -> Result {
                // SAFETY: This is used for `numfmt::Part::Num` and `numfmt::Part::Copy`.
                // It's safe to use for `numfmt::Part::Num` since every char `c` is between
                // `b'0'` and `b'9'`, which means `s` is valid UTF-8. It's safe to use for
                // `numfmt::Part::Copy` due to this function's precondition.
                buf.write_str(unsafe { str::from_utf8_unchecked(s) })
            }
    
            if !formatted.sign.is_empty() {
                self.buf.write_str(formatted.sign)?;
            }
            for part in formatted.parts {
                match *part {
                    numfmt::Part::Zero(mut nzeroes) => {
                        const ZEROES: &str = // 64 zeroes
                            "0000000000000000000000000000000000000000000000000000000000000000";
                        while nzeroes > ZEROES.len() {
                            self.buf.write_str(ZEROES)?;
                            nzeroes -= ZEROES.len();
                        }
                        if nzeroes > 0 {
                            self.buf.write_str(&ZEROES[..nzeroes])?;
                        }
                    }
                    numfmt::Part::Num(mut v) => {
                        let mut s = [0; 5];
                        let len = part.len();
                        for c in s[..len].iter_mut().rev() {
                            *c = b'0' + (v % 10) as u8;
                            v /= 10;
                        }
                        // SAFETY: Per the precondition.
                        unsafe {
                            write_bytes(self.buf, &s[..len])?;
                        }
                    }
                    // SAFETY: Per the precondition.
                    numfmt::Part::Copy(buf) => unsafe {
                        write_bytes(self.buf, buf)?;
                    },
                }
            }
            Ok(())
        }
    *)
    Definition write_formatted_parts (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; formatted ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let formatted := M.alloc (| formatted |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ _ :=
                  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 "str", "is_empty", [] |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| formatted |),
                                          "core::num::fmt::Formatted",
                                          "sign"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) 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.path "core::fmt::Error" ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::fmt::Write",
                                        Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                                        [],
                                        "write_str",
                                        []
                                      |),
                                      [
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| self |),
                                            "core::fmt::Formatter",
                                            "buf"
                                          |)
                                        |);
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| formatted |),
                                            "core::num::fmt::Formatted",
                                            "sign"
                                          |)
                                        |)
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          M.return_ (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::try_trait::FromResidual",
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    []
                                                    [
                                                      Ty.path "core::convert::Infallible";
                                                      Ty.path "core::fmt::Error"
                                                    ]
                                                ],
                                                "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
                          M.alloc (| Value.Tuple [] |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) 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.path "core::num::fmt::Part" ] ],
                            [],
                            "into_iter",
                            []
                          |),
                          [
                            M.read (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (| formatted |),
                                "core::num::fmt::Formatted",
                                "parts"
                              |)
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let iter := M.copy (| γ |) in
                            M.loop (|
                              ltac:(M.monadic
                                (let~ _ :=
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::iter::traits::iterator::Iterator",
                                          Ty.apply
                                            (Ty.path "core::slice::iter::Iter")
                                            []
                                            [ Ty.path "core::num::fmt::Part" ],
                                          [],
                                          "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 part := M.copy (| γ0_0 |) in
                                          M.match_operator (|
                                            M.read (| part |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::num::fmt::Part::Zero",
                                                      0
                                                    |) in
                                                  let nzeroes := M.copy (| γ0_0 |) in
                                                  let~ _ :=
                                                    M.loop (|
                                                      ltac:(M.monadic
                                                        (M.match_operator (|
                                                          M.alloc (| Value.Tuple [] |),
                                                          [
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let γ :=
                                                                  M.use
                                                                    (M.alloc (|
                                                                      BinOp.gt (|
                                                                        M.read (| nzeroes |),
                                                                        M.call_closure (|
                                                                          M.get_associated_function (|
                                                                            Ty.path "str",
                                                                            "len",
                                                                            []
                                                                          |),
                                                                          [
                                                                            M.read (|
                                                                              M.get_constant (|
                                                                                "core::fmt::write_formatted_parts::ZEROES"
                                                                              |)
                                                                            |)
                                                                          ]
                                                                        |)
                                                                      |)
                                                                    |)) in
                                                                let _ :=
                                                                  M.is_constant_or_break_match (|
                                                                    M.read (| γ |),
                                                                    Value.Bool true
                                                                  |) 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.path
                                                                                "core::fmt::Error"
                                                                            ],
                                                                          [],
                                                                          "branch",
                                                                          []
                                                                        |),
                                                                        [
                                                                          M.call_closure (|
                                                                            M.get_trait_method (|
                                                                              "core::fmt::Write",
                                                                              Ty.dyn
                                                                                [
                                                                                  ("core::fmt::Write::Trait",
                                                                                    [])
                                                                                ],
                                                                              [],
                                                                              "write_str",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.read (|
                                                                                M.SubPointer.get_struct_record_field (|
                                                                                  M.read (| self |),
                                                                                  "core::fmt::Formatter",
                                                                                  "buf"
                                                                                |)
                                                                              |);
                                                                              M.read (|
                                                                                M.get_constant (|
                                                                                  "core::fmt::write_formatted_parts::ZEROES"
                                                                                |)
                                                                              |)
                                                                            ]
                                                                          |)
                                                                        ]
                                                                      |)
                                                                    |),
                                                                    [
                                                                      fun γ =>
                                                                        ltac:(M.monadic
                                                                          (let γ0_0 :=
                                                                            M.SubPointer.get_struct_tuple_field (|
                                                                              γ,
                                                                              "core::ops::control_flow::ControlFlow::Break",
                                                                              0
                                                                            |) in
                                                                          let residual :=
                                                                            M.copy (| γ0_0 |) in
                                                                          M.alloc (|
                                                                            M.never_to_any (|
                                                                              M.read (|
                                                                                M.return_ (|
                                                                                  M.call_closure (|
                                                                                    M.get_trait_method (|
                                                                                      "core::ops::try_trait::FromResidual",
                                                                                      Ty.apply
                                                                                        (Ty.path
                                                                                          "core::result::Result")
                                                                                        []
                                                                                        [
                                                                                          Ty.tuple
                                                                                            [];
                                                                                          Ty.path
                                                                                            "core::fmt::Error"
                                                                                        ],
                                                                                      [
                                                                                        Ty.apply
                                                                                          (Ty.path
                                                                                            "core::result::Result")
                                                                                          []
                                                                                          [
                                                                                            Ty.path
                                                                                              "core::convert::Infallible";
                                                                                            Ty.path
                                                                                              "core::fmt::Error"
                                                                                          ]
                                                                                      ],
                                                                                      "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~ _ :=
                                                                  let β := nzeroes in
                                                                  M.write (|
                                                                    β,
                                                                    BinOp.Wrap.sub (|
                                                                      M.read (| β |),
                                                                      M.call_closure (|
                                                                        M.get_associated_function (|
                                                                          Ty.path "str",
                                                                          "len",
                                                                          []
                                                                        |),
                                                                        [
                                                                          M.read (|
                                                                            M.get_constant (|
                                                                              "core::fmt::write_formatted_parts::ZEROES"
                                                                            |)
                                                                          |)
                                                                        ]
                                                                      |)
                                                                    |)
                                                                  |) in
                                                                M.alloc (| Value.Tuple [] |)));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (M.alloc (|
                                                                  M.never_to_any (|
                                                                    M.read (|
                                                                      let~ _ :=
                                                                        M.alloc (|
                                                                          M.never_to_any (|
                                                                            M.read (|
                                                                              M.break (||)
                                                                            |)
                                                                          |)
                                                                        |) in
                                                                      M.alloc (| Value.Tuple [] |)
                                                                    |)
                                                                  |)
                                                                |)))
                                                          ]
                                                        |)))
                                                    |) in
                                                  M.match_operator (|
                                                    M.alloc (| Value.Tuple [] |),
                                                    [
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (let γ :=
                                                            M.use
                                                              (M.alloc (|
                                                                BinOp.gt (|
                                                                  M.read (| nzeroes |),
                                                                  Value.Integer IntegerKind.Usize 0
                                                                |)
                                                              |)) in
                                                          let _ :=
                                                            M.is_constant_or_break_match (|
                                                              M.read (| γ |),
                                                              Value.Bool true
                                                            |) 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.path "core::fmt::Error"
                                                                      ],
                                                                    [],
                                                                    "branch",
                                                                    []
                                                                  |),
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_trait_method (|
                                                                        "core::fmt::Write",
                                                                        Ty.dyn
                                                                          [
                                                                            ("core::fmt::Write::Trait",
                                                                              [])
                                                                          ],
                                                                        [],
                                                                        "write_str",
                                                                        []
                                                                      |),
                                                                      [
                                                                        M.read (|
                                                                          M.SubPointer.get_struct_record_field (|
                                                                            M.read (| self |),
                                                                            "core::fmt::Formatter",
                                                                            "buf"
                                                                          |)
                                                                        |);
                                                                        M.call_closure (|
                                                                          M.get_trait_method (|
                                                                            "core::ops::index::Index",
                                                                            Ty.path "str",
                                                                            [
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "core::ops::range::RangeTo")
                                                                                []
                                                                                [ Ty.path "usize" ]
                                                                            ],
                                                                            "index",
                                                                            []
                                                                          |),
                                                                          [
                                                                            M.read (|
                                                                              M.get_constant (|
                                                                                "core::fmt::write_formatted_parts::ZEROES"
                                                                              |)
                                                                            |);
                                                                            Value.StructRecord
                                                                              "core::ops::range::RangeTo"
                                                                              [
                                                                                ("end_",
                                                                                  M.read (|
                                                                                    nzeroes
                                                                                  |))
                                                                              ]
                                                                          ]
                                                                        |)
                                                                      ]
                                                                    |)
                                                                  ]
                                                                |)
                                                              |),
                                                              [
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let γ0_0 :=
                                                                      M.SubPointer.get_struct_tuple_field (|
                                                                        γ,
                                                                        "core::ops::control_flow::ControlFlow::Break",
                                                                        0
                                                                      |) in
                                                                    let residual :=
                                                                      M.copy (| γ0_0 |) in
                                                                    M.alloc (|
                                                                      M.never_to_any (|
                                                                        M.read (|
                                                                          M.return_ (|
                                                                            M.call_closure (|
                                                                              M.get_trait_method (|
                                                                                "core::ops::try_trait::FromResidual",
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.tuple [];
                                                                                    Ty.path
                                                                                      "core::fmt::Error"
                                                                                  ],
                                                                                [
                                                                                  Ty.apply
                                                                                    (Ty.path
                                                                                      "core::result::Result")
                                                                                    []
                                                                                    [
                                                                                      Ty.path
                                                                                        "core::convert::Infallible";
                                                                                      Ty.path
                                                                                        "core::fmt::Error"
                                                                                    ]
                                                                                ],
                                                                                "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
                                                          M.alloc (| Value.Tuple [] |)));
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (M.alloc (| Value.Tuple [] |)))
                                                    ]
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::num::fmt::Part::Num",
                                                      0
                                                    |) in
                                                  let v := M.copy (| γ0_0 |) in
                                                  let~ s :=
                                                    M.alloc (|
                                                      repeat (|
                                                        Value.Integer IntegerKind.U8 0,
                                                        Value.Integer IntegerKind.Usize 5
                                                      |)
                                                    |) in
                                                  let~ len :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "core::num::fmt::Part",
                                                          "len",
                                                          []
                                                        |),
                                                        [ M.read (| part |) ]
                                                      |)
                                                    |) in
                                                  let~ _ :=
                                                    M.use
                                                      (M.match_operator (|
                                                        M.alloc (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::iter::traits::collect::IntoIterator",
                                                              Ty.apply
                                                                (Ty.path
                                                                  "core::iter::adapters::rev::Rev")
                                                                []
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path
                                                                      "core::slice::iter::IterMut")
                                                                    []
                                                                    [ Ty.path "u8" ]
                                                                ],
                                                              [],
                                                              "into_iter",
                                                              []
                                                            |),
                                                            [
                                                              M.call_closure (|
                                                                M.get_trait_method (|
                                                                  "core::iter::traits::iterator::Iterator",
                                                                  Ty.apply
                                                                    (Ty.path
                                                                      "core::slice::iter::IterMut")
                                                                    []
                                                                    [ Ty.path "u8" ],
                                                                  [],
                                                                  "rev",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.apply
                                                                        (Ty.path "slice")
                                                                        []
                                                                        [ Ty.path "u8" ],
                                                                      "iter_mut",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.call_closure (|
                                                                        M.get_trait_method (|
                                                                          "core::ops::index::IndexMut",
                                                                          Ty.apply
                                                                            (Ty.path "array")
                                                                            [
                                                                              Value.Integer
                                                                                IntegerKind.Usize
                                                                                5
                                                                            ]
                                                                            [ Ty.path "u8" ],
                                                                          [
                                                                            Ty.apply
                                                                              (Ty.path
                                                                                "core::ops::range::RangeTo")
                                                                              []
                                                                              [ Ty.path "usize" ]
                                                                          ],
                                                                          "index_mut",
                                                                          []
                                                                        |),
                                                                        [
                                                                          s;
                                                                          Value.StructRecord
                                                                            "core::ops::range::RangeTo"
                                                                            [
                                                                              ("end_",
                                                                                M.read (| len |))
                                                                            ]
                                                                        ]
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            ]
                                                          |)
                                                        |),
                                                        [
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let iter := M.copy (| γ |) in
                                                              M.loop (|
                                                                ltac:(M.monadic
                                                                  (let~ _ :=
                                                                    M.match_operator (|
                                                                      M.alloc (|
                                                                        M.call_closure (|
                                                                          M.get_trait_method (|
                                                                            "core::iter::traits::iterator::Iterator",
                                                                            Ty.apply
                                                                              (Ty.path
                                                                                "core::iter::adapters::rev::Rev")
                                                                              []
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::slice::iter::IterMut")
                                                                                  []
                                                                                  [ Ty.path "u8" ]
                                                                              ],
                                                                            [],
                                                                            "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 c :=
                                                                              M.copy (| γ0_0 |) in
                                                                            let~ _ :=
                                                                              M.write (|
                                                                                M.read (| c |),
                                                                                BinOp.Wrap.add (|
                                                                                  M.read (|
                                                                                    UnsupportedLiteral
                                                                                  |),
                                                                                  M.rust_cast
                                                                                    (BinOp.Wrap.rem (|
                                                                                      M.read (|
                                                                                        v
                                                                                      |),
                                                                                      Value.Integer
                                                                                        IntegerKind.U16
                                                                                        10
                                                                                    |))
                                                                                |)
                                                                              |) in
                                                                            let~ _ :=
                                                                              let β := v in
                                                                              M.write (|
                                                                                β,
                                                                                BinOp.Wrap.div (|
                                                                                  M.read (| β |),
                                                                                  Value.Integer
                                                                                    IntegerKind.U16
                                                                                    10
                                                                                |)
                                                                              |) in
                                                                            M.alloc (|
                                                                              Value.Tuple []
                                                                            |)))
                                                                      ]
                                                                    |) in
                                                                  M.alloc (| Value.Tuple [] |)))
                                                              |)))
                                                        ]
                                                      |)) 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.path "core::fmt::Error"
                                                              ],
                                                            [],
                                                            "branch",
                                                            []
                                                          |),
                                                          [
                                                            M.call_closure (|
                                                              M.get_associated_function (|
                                                                Self,
                                                                "write_bytes.write_formatted_parts",
                                                                []
                                                              |),
                                                              [
                                                                M.read (|
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    M.read (| self |),
                                                                    "core::fmt::Formatter",
                                                                    "buf"
                                                                  |)
                                                                |);
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::index::Index",
                                                                    Ty.apply
                                                                      (Ty.path "array")
                                                                      [
                                                                        Value.Integer
                                                                          IntegerKind.Usize
                                                                          5
                                                                      ]
                                                                      [ Ty.path "u8" ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::ops::range::RangeTo")
                                                                        []
                                                                        [ Ty.path "usize" ]
                                                                    ],
                                                                    "index",
                                                                    []
                                                                  |),
                                                                  [
                                                                    s;
                                                                    Value.StructRecord
                                                                      "core::ops::range::RangeTo"
                                                                      [ ("end_", M.read (| len |)) ]
                                                                  ]
                                                                |)
                                                              ]
                                                            |)
                                                          ]
                                                        |)
                                                      |),
                                                      [
                                                        fun γ =>
                                                          ltac:(M.monadic
                                                            (let γ0_0 :=
                                                              M.SubPointer.get_struct_tuple_field (|
                                                                γ,
                                                                "core::ops::control_flow::ControlFlow::Break",
                                                                0
                                                              |) in
                                                            let residual := M.copy (| γ0_0 |) in
                                                            M.alloc (|
                                                              M.never_to_any (|
                                                                M.read (|
                                                                  M.return_ (|
                                                                    M.call_closure (|
                                                                      M.get_trait_method (|
                                                                        "core::ops::try_trait::FromResidual",
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::result::Result")
                                                                          []
                                                                          [
                                                                            Ty.tuple [];
                                                                            Ty.path
                                                                              "core::fmt::Error"
                                                                          ],
                                                                        [
                                                                          Ty.apply
                                                                            (Ty.path
                                                                              "core::result::Result")
                                                                            []
                                                                            [
                                                                              Ty.path
                                                                                "core::convert::Infallible";
                                                                              Ty.path
                                                                                "core::fmt::Error"
                                                                            ]
                                                                        ],
                                                                        "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
                                                  M.alloc (| Value.Tuple [] |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::num::fmt::Part::Copy",
                                                      0
                                                    |) in
                                                  let buf := M.copy (| γ0_0 |) 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.path "core::fmt::Error"
                                                              ],
                                                            [],
                                                            "branch",
                                                            []
                                                          |),
                                                          [
                                                            M.call_closure (|
                                                              M.get_associated_function (|
                                                                Self,
                                                                "write_bytes.write_formatted_parts",
                                                                []
                                                              |),
                                                              [
                                                                M.read (|
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    M.read (| self |),
                                                                    "core::fmt::Formatter",
                                                                    "buf"
                                                                  |)
                                                                |);
                                                                M.read (| buf |)
                                                              ]
                                                            |)
                                                          ]
                                                        |)
                                                      |),
                                                      [
                                                        fun γ =>
                                                          ltac:(M.monadic
                                                            (let γ0_0 :=
                                                              M.SubPointer.get_struct_tuple_field (|
                                                                γ,
                                                                "core::ops::control_flow::ControlFlow::Break",
                                                                0
                                                              |) in
                                                            let residual := M.copy (| γ0_0 |) in
                                                            M.alloc (|
                                                              M.never_to_any (|
                                                                M.read (|
                                                                  M.return_ (|
                                                                    M.call_closure (|
                                                                      M.get_trait_method (|
                                                                        "core::ops::try_trait::FromResidual",
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::result::Result")
                                                                          []
                                                                          [
                                                                            Ty.tuple [];
                                                                            Ty.path
                                                                              "core::fmt::Error"
                                                                          ],
                                                                        [
                                                                          Ty.apply
                                                                            (Ty.path
                                                                              "core::result::Result")
                                                                            []
                                                                            [
                                                                              Ty.path
                                                                                "core::convert::Infallible";
                                                                              Ty.path
                                                                                "core::fmt::Error"
                                                                            ]
                                                                        ],
                                                                        "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
                                                  M.alloc (| Value.Tuple [] |)))
                                            ]
                                          |)))
                                    ]
                                  |) in
                                M.alloc (| Value.Tuple [] |)))
                            |)))
                      ]
                    |)) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_write_formatted_parts :
      M.IsAssociatedFunction Self "write_formatted_parts" write_formatted_parts.
    
    (*
        pub fn write_str(&mut self, data: &str) -> Result {
            self.buf.write_str(data)
        }
    *)
    Definition write_str (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; data ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let data := M.alloc (| data |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::fmt::Write",
              Ty.dyn [ ("core::fmt::Write::Trait", []) ],
              [],
              "write_str",
              []
            |),
            [
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "core::fmt::Formatter",
                  "buf"
                |)
              |);
              M.read (| data |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_write_str : M.IsAssociatedFunction Self "write_str" write_str.
    
    (*
        pub fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result {
            if let Some(s) = fmt.as_statically_known_str() {
                self.buf.write_str(s)
            } else {
                write(self.buf, fmt)
            }
        }
    *)
    Definition write_fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; fmt ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let fmt := M.alloc (| fmt |) 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.path "core::fmt::Arguments",
                            "as_statically_known_str",
                            []
                          |),
                          [ fmt ]
                        |)
                      |) in
                    let γ0_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::option::Option::Some",
                        0
                      |) in
                    let s := M.copy (| γ0_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::fmt::Write",
                          Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                          [],
                          "write_str",
                          []
                        |),
                        [
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::fmt::Formatter",
                              "buf"
                            |)
                          |);
                          M.read (| s |)
                        ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (M.alloc (|
                      M.call_closure (|
                        M.get_function (| "core::fmt::write", [] |),
                        [
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::fmt::Formatter",
                              "buf"
                            |)
                          |);
                          M.read (| fmt |)
                        ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_write_fmt : M.IsAssociatedFunction Self "write_fmt" write_fmt.
    
    (*
        pub fn flags(&self) -> u32 {
            self.flags
        }
    *)
    Definition flags (ε : 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.SubPointer.get_struct_record_field (|
              M.read (| self |),
              "core::fmt::Formatter",
              "flags"
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_flags : M.IsAssociatedFunction Self "flags" flags.
    
    (*
        pub fn fill(&self) -> char {
            self.fill
        }
    *)
    Definition fill (ε : 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.SubPointer.get_struct_record_field (|
              M.read (| self |),
              "core::fmt::Formatter",
              "fill"
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_fill : M.IsAssociatedFunction Self "fill" fill.
    
    (*
        pub fn align(&self) -> Option<Alignment> {
            match self.align {
                rt::Alignment::Left => Some(Alignment::Left),
                rt::Alignment::Right => Some(Alignment::Right),
                rt::Alignment::Center => Some(Alignment::Center),
                rt::Alignment::Unknown => None,
            }
        }
    *)
    Definition align (ε : 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 (|
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "core::fmt::Formatter",
                "align"
              |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Left" |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::option::Option::Some"
                        [ Value.StructTuple "core::fmt::Alignment::Left" [] ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Right" |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::option::Option::Some"
                        [ Value.StructTuple "core::fmt::Alignment::Right" [] ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Center" |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::option::Option::Some"
                        [ Value.StructTuple "core::fmt::Alignment::Center" [] ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Unknown" |) in
                    M.alloc (| Value.StructTuple "core::option::Option::None" [] |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_align : M.IsAssociatedFunction Self "align" align.
    
    (*
        pub fn width(&self) -> Option<usize> {
            self.width
        }
    *)
    Definition width (ε : 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.SubPointer.get_struct_record_field (|
              M.read (| self |),
              "core::fmt::Formatter",
              "width"
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_width : M.IsAssociatedFunction Self "width" width.
    
    (*
        pub fn precision(&self) -> Option<usize> {
            self.precision
        }
    *)
    Definition precision (ε : 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.SubPointer.get_struct_record_field (|
              M.read (| self |),
              "core::fmt::Formatter",
              "precision"
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_precision : M.IsAssociatedFunction Self "precision" precision.
    
    (*
        pub fn sign_plus(&self) -> bool {
            self.flags & (1 << rt::Flag::SignPlus as u32) != 0
        }
    *)
    Definition sign_plus (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          BinOp.ne (|
            BinOp.bit_and
              (M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "core::fmt::Formatter",
                  "flags"
                |)
              |))
              (BinOp.Wrap.shl (|
                Value.Integer IntegerKind.U32 1,
                M.rust_cast (Value.Integer IntegerKind.Isize 0)
              |)),
            Value.Integer IntegerKind.U32 0
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_sign_plus : M.IsAssociatedFunction Self "sign_plus" sign_plus.
    
    (*
        pub fn sign_minus(&self) -> bool {
            self.flags & (1 << rt::Flag::SignMinus as u32) != 0
        }
    *)
    Definition sign_minus (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          BinOp.ne (|
            BinOp.bit_and
              (M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "core::fmt::Formatter",
                  "flags"
                |)
              |))
              (BinOp.Wrap.shl (|
                Value.Integer IntegerKind.U32 1,
                M.rust_cast (Value.Integer IntegerKind.Isize 1)
              |)),
            Value.Integer IntegerKind.U32 0
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_sign_minus : M.IsAssociatedFunction Self "sign_minus" sign_minus.
    
    (*
        pub fn alternate(&self) -> bool {
            self.flags & (1 << rt::Flag::Alternate as u32) != 0
        }
    *)
    Definition alternate (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          BinOp.ne (|
            BinOp.bit_and
              (M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "core::fmt::Formatter",
                  "flags"
                |)
              |))
              (BinOp.Wrap.shl (|
                Value.Integer IntegerKind.U32 1,
                M.rust_cast (Value.Integer IntegerKind.Isize 2)
              |)),
            Value.Integer IntegerKind.U32 0
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_alternate : M.IsAssociatedFunction Self "alternate" alternate.
    
    (*
        pub fn sign_aware_zero_pad(&self) -> bool {
            self.flags & (1 << rt::Flag::SignAwareZeroPad as u32) != 0
        }
    *)
    Definition sign_aware_zero_pad (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          BinOp.ne (|
            BinOp.bit_and
              (M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "core::fmt::Formatter",
                  "flags"
                |)
              |))
              (BinOp.Wrap.shl (|
                Value.Integer IntegerKind.U32 1,
                M.rust_cast (Value.Integer IntegerKind.Isize 3)
              |)),
            Value.Integer IntegerKind.U32 0
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_sign_aware_zero_pad :
      M.IsAssociatedFunction Self "sign_aware_zero_pad" sign_aware_zero_pad.
    
    (*
        fn debug_lower_hex(&self) -> bool {
            self.flags & (1 << rt::Flag::DebugLowerHex as u32) != 0
        }
    *)
    Definition debug_lower_hex (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          BinOp.ne (|
            BinOp.bit_and
              (M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "core::fmt::Formatter",
                  "flags"
                |)
              |))
              (BinOp.Wrap.shl (|
                Value.Integer IntegerKind.U32 1,
                M.rust_cast (Value.Integer IntegerKind.Isize 4)
              |)),
            Value.Integer IntegerKind.U32 0
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_lower_hex :
      M.IsAssociatedFunction Self "debug_lower_hex" debug_lower_hex.
    
    (*
        fn debug_upper_hex(&self) -> bool {
            self.flags & (1 << rt::Flag::DebugUpperHex as u32) != 0
        }
    *)
    Definition debug_upper_hex (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          BinOp.ne (|
            BinOp.bit_and
              (M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "core::fmt::Formatter",
                  "flags"
                |)
              |))
              (BinOp.Wrap.shl (|
                Value.Integer IntegerKind.U32 1,
                M.rust_cast (Value.Integer IntegerKind.Isize 5)
              |)),
            Value.Integer IntegerKind.U32 0
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_upper_hex :
      M.IsAssociatedFunction Self "debug_upper_hex" debug_upper_hex.
    
    (*
        pub fn debug_struct<'b>(&'b mut self, name: &str) -> DebugStruct<'b, 'a> {
            builders::debug_struct_new(self, name)
        }
    *)
    Definition debug_struct (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; name ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          M.call_closure (|
            M.get_function (| "core::fmt::builders::debug_struct_new", [] |),
            [ M.read (| self |); M.read (| name |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_struct : M.IsAssociatedFunction Self "debug_struct" debug_struct.
    
    (*
        pub fn debug_struct_field1_finish<'b>(
            &'b mut self,
            name: &str,
            name1: &str,
            value1: &dyn Debug,
        ) -> Result {
            let mut builder = builders::debug_struct_new(self, name);
            builder.field(name1, value1);
            builder.finish()
        }
    *)
    Definition debug_struct_field1_finish
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self; name; name1; value1 ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          let name1 := M.alloc (| name1 |) in
          let value1 := M.alloc (| value1 |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (| "core::fmt::builders::debug_struct_new", [] |),
                  [ M.read (| self |); M.read (| name |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name1 |); M.read (| value1 |) ]
                |)
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugStruct",
                  "finish",
                  []
                |),
                [ builder ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_struct_field1_finish :
      M.IsAssociatedFunction Self "debug_struct_field1_finish" debug_struct_field1_finish.
    
    (*
        pub fn debug_struct_field2_finish<'b>(
            &'b mut self,
            name: &str,
            name1: &str,
            value1: &dyn Debug,
            name2: &str,
            value2: &dyn Debug,
        ) -> Result {
            let mut builder = builders::debug_struct_new(self, name);
            builder.field(name1, value1);
            builder.field(name2, value2);
            builder.finish()
        }
    *)
    Definition debug_struct_field2_finish
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self; name; name1; value1; name2; value2 ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          let name1 := M.alloc (| name1 |) in
          let value1 := M.alloc (| value1 |) in
          let name2 := M.alloc (| name2 |) in
          let value2 := M.alloc (| value2 |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (| "core::fmt::builders::debug_struct_new", [] |),
                  [ M.read (| self |); M.read (| name |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name1 |); M.read (| value1 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name2 |); M.read (| value2 |) ]
                |)
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugStruct",
                  "finish",
                  []
                |),
                [ builder ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_struct_field2_finish :
      M.IsAssociatedFunction Self "debug_struct_field2_finish" debug_struct_field2_finish.
    
    (*
        pub fn debug_struct_field3_finish<'b>(
            &'b mut self,
            name: &str,
            name1: &str,
            value1: &dyn Debug,
            name2: &str,
            value2: &dyn Debug,
            name3: &str,
            value3: &dyn Debug,
        ) -> Result {
            let mut builder = builders::debug_struct_new(self, name);
            builder.field(name1, value1);
            builder.field(name2, value2);
            builder.field(name3, value3);
            builder.finish()
        }
    *)
    Definition debug_struct_field3_finish
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self; name; name1; value1; name2; value2; name3; value3 ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          let name1 := M.alloc (| name1 |) in
          let value1 := M.alloc (| value1 |) in
          let name2 := M.alloc (| name2 |) in
          let value2 := M.alloc (| value2 |) in
          let name3 := M.alloc (| name3 |) in
          let value3 := M.alloc (| value3 |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (| "core::fmt::builders::debug_struct_new", [] |),
                  [ M.read (| self |); M.read (| name |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name1 |); M.read (| value1 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name2 |); M.read (| value2 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name3 |); M.read (| value3 |) ]
                |)
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugStruct",
                  "finish",
                  []
                |),
                [ builder ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_struct_field3_finish :
      M.IsAssociatedFunction Self "debug_struct_field3_finish" debug_struct_field3_finish.
    
    (*
        pub fn debug_struct_field4_finish<'b>(
            &'b mut self,
            name: &str,
            name1: &str,
            value1: &dyn Debug,
            name2: &str,
            value2: &dyn Debug,
            name3: &str,
            value3: &dyn Debug,
            name4: &str,
            value4: &dyn Debug,
        ) -> Result {
            let mut builder = builders::debug_struct_new(self, name);
            builder.field(name1, value1);
            builder.field(name2, value2);
            builder.field(name3, value3);
            builder.field(name4, value4);
            builder.finish()
        }
    *)
    Definition debug_struct_field4_finish
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self; name; name1; value1; name2; value2; name3; value3; name4; value4 ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          let name1 := M.alloc (| name1 |) in
          let value1 := M.alloc (| value1 |) in
          let name2 := M.alloc (| name2 |) in
          let value2 := M.alloc (| value2 |) in
          let name3 := M.alloc (| name3 |) in
          let value3 := M.alloc (| value3 |) in
          let name4 := M.alloc (| name4 |) in
          let value4 := M.alloc (| value4 |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (| "core::fmt::builders::debug_struct_new", [] |),
                  [ M.read (| self |); M.read (| name |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name1 |); M.read (| value1 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name2 |); M.read (| value2 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name3 |); M.read (| value3 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name4 |); M.read (| value4 |) ]
                |)
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugStruct",
                  "finish",
                  []
                |),
                [ builder ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_struct_field4_finish :
      M.IsAssociatedFunction Self "debug_struct_field4_finish" debug_struct_field4_finish.
    
    (*
        pub fn debug_struct_field5_finish<'b>(
            &'b mut self,
            name: &str,
            name1: &str,
            value1: &dyn Debug,
            name2: &str,
            value2: &dyn Debug,
            name3: &str,
            value3: &dyn Debug,
            name4: &str,
            value4: &dyn Debug,
            name5: &str,
            value5: &dyn Debug,
        ) -> Result {
            let mut builder = builders::debug_struct_new(self, name);
            builder.field(name1, value1);
            builder.field(name2, value2);
            builder.field(name3, value3);
            builder.field(name4, value4);
            builder.field(name5, value5);
            builder.finish()
        }
    *)
    Definition debug_struct_field5_finish
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [],
          [],
          [ self; name; name1; value1; name2; value2; name3; value3; name4; value4; name5; value5
          ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          let name1 := M.alloc (| name1 |) in
          let value1 := M.alloc (| value1 |) in
          let name2 := M.alloc (| name2 |) in
          let value2 := M.alloc (| value2 |) in
          let name3 := M.alloc (| name3 |) in
          let value3 := M.alloc (| value3 |) in
          let name4 := M.alloc (| name4 |) in
          let value4 := M.alloc (| value4 |) in
          let name5 := M.alloc (| name5 |) in
          let value5 := M.alloc (| value5 |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (| "core::fmt::builders::debug_struct_new", [] |),
                  [ M.read (| self |); M.read (| name |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name1 |); M.read (| value1 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name2 |); M.read (| value2 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name3 |); M.read (| value3 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name4 |); M.read (| value4 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugStruct",
                    "field",
                    []
                  |),
                  [ builder; M.read (| name5 |); M.read (| value5 |) ]
                |)
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugStruct",
                  "finish",
                  []
                |),
                [ builder ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_struct_field5_finish :
      M.IsAssociatedFunction Self "debug_struct_field5_finish" debug_struct_field5_finish.
    
    (*
        pub fn debug_struct_fields_finish<'b>(
            &'b mut self,
            name: &str,
            names: &[&str],
            values: &[&dyn Debug],
        ) -> Result {
            assert_eq!(names.len(), values.len());
            let mut builder = builders::debug_struct_new(self, name);
            for (name, value) in iter::zip(names, values) {
                builder.field(name, value);
            }
            builder.finish()
        }
    *)
    Definition debug_struct_fields_finish
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self; name; names; values ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          let names := M.alloc (| names |) in
          let values := M.alloc (| values |) in
          M.read (|
            let~ _ :=
              M.match_operator (|
                M.alloc (|
                  Value.Tuple
                    [
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              []
                              [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ],
                            "len",
                            []
                          |),
                          [ M.read (| names |) ]
                        |)
                      |);
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              []
                              [
                                Ty.apply
                                  (Ty.path "&")
                                  []
                                  [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ]
                              ],
                            "len",
                            []
                          |),
                          [ M.read (| values |) ]
                        |)
                      |)
                    ]
                |),
                [
                  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 left_val := M.copy (| γ0_0 |) in
                      let right_val := M.copy (| γ0_1 |) in
                      M.match_operator (|
                        M.alloc (| Value.Tuple [] |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ :=
                                M.use
                                  (M.alloc (|
                                    UnOp.not (|
                                      BinOp.eq (|
                                        M.read (| M.read (| left_val |) |),
                                        M.read (| M.read (| right_val |) |)
                                      |)
                                    |)
                                  |)) in
                              let _ :=
                                M.is_constant_or_break_match (|
                                  M.read (| γ |),
                                  Value.Bool true
                                |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    let~ kind :=
                                      M.alloc (|
                                        Value.StructTuple "core::panicking::AssertKind::Eq" []
                                      |) in
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_function (|
                                          "core::panicking::assert_failed",
                                          [ Ty.path "usize"; Ty.path "usize" ]
                                        |),
                                        [
                                          M.read (| kind |);
                                          M.read (| left_val |);
                                          M.read (| right_val |);
                                          Value.StructTuple "core::option::Option::None" []
                                        ]
                                      |)
                                    |)
                                  |)
                                |)
                              |)));
                          fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                        ]
                      |)))
                ]
              |) in
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (| "core::fmt::builders::debug_struct_new", [] |),
                  [ M.read (| self |); M.read (| name |) ]
                |)
              |) in
            let~ _ :=
              M.use
                (M.match_operator (|
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::traits::collect::IntoIterator",
                        Ty.apply
                          (Ty.path "core::iter::adapters::zip::Zip")
                          []
                          [
                            Ty.apply
                              (Ty.path "core::slice::iter::Iter")
                              []
                              [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ];
                            Ty.apply
                              (Ty.path "core::slice::iter::Iter")
                              []
                              [
                                Ty.apply
                                  (Ty.path "&")
                                  []
                                  [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ]
                              ]
                          ],
                        [],
                        "into_iter",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_function (|
                            "core::iter::adapters::zip::zip",
                            [
                              Ty.apply
                                (Ty.path "&")
                                []
                                [
                                  Ty.apply
                                    (Ty.path "slice")
                                    []
                                    [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ]
                                ];
                              Ty.apply
                                (Ty.path "&")
                                []
                                [
                                  Ty.apply
                                    (Ty.path "slice")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        []
                                        [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ]
                                    ]
                                ]
                            ]
                          |),
                          [ M.read (| names |); M.read (| values |) ]
                        |)
                      ]
                    |)
                  |),
                  [
                    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::zip::Zip")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "core::slice::iter::Iter")
                                            []
                                            [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ];
                                          Ty.apply
                                            (Ty.path "core::slice::iter::Iter")
                                            []
                                            [
                                              Ty.apply
                                                (Ty.path "&")
                                                []
                                                [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ]
                                            ]
                                        ],
                                      [],
                                      "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 γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in
                                      let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in
                                      let name := M.copy (| γ1_0 |) in
                                      let value := M.copy (| γ1_1 |) in
                                      let~ _ :=
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "core::fmt::builders::DebugStruct",
                                              "field",
                                              []
                                            |),
                                            [
                                              builder;
                                              M.read (| M.read (| name |) |);
                                              M.read (| value |)
                                            ]
                                          |)
                                        |) in
                                      M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            M.alloc (| Value.Tuple [] |)))
                        |)))
                  ]
                |)) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugStruct",
                  "finish",
                  []
                |),
                [ builder ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_struct_fields_finish :
      M.IsAssociatedFunction Self "debug_struct_fields_finish" debug_struct_fields_finish.
    
    (*
        pub fn debug_tuple<'b>(&'b mut self, name: &str) -> DebugTuple<'b, 'a> {
            builders::debug_tuple_new(self, name)
        }
    *)
    Definition debug_tuple (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; name ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          M.call_closure (|
            M.get_function (| "core::fmt::builders::debug_tuple_new", [] |),
            [ M.read (| self |); M.read (| name |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_tuple : M.IsAssociatedFunction Self "debug_tuple" debug_tuple.
    
    (*
        pub fn debug_tuple_field1_finish<'b>(&'b mut self, name: &str, value1: &dyn Debug) -> Result {
            let mut builder = builders::debug_tuple_new(self, name);
            builder.field(value1);
            builder.finish()
        }
    *)
    Definition debug_tuple_field1_finish
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self; name; value1 ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          let value1 := M.alloc (| value1 |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (| "core::fmt::builders::debug_tuple_new", [] |),
                  [ M.read (| self |); M.read (| name |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value1 |) ]
                |)
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugTuple",
                  "finish",
                  []
                |),
                [ builder ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_tuple_field1_finish :
      M.IsAssociatedFunction Self "debug_tuple_field1_finish" debug_tuple_field1_finish.
    
    (*
        pub fn debug_tuple_field2_finish<'b>(
            &'b mut self,
            name: &str,
            value1: &dyn Debug,
            value2: &dyn Debug,
        ) -> Result {
            let mut builder = builders::debug_tuple_new(self, name);
            builder.field(value1);
            builder.field(value2);
            builder.finish()
        }
    *)
    Definition debug_tuple_field2_finish
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self; name; value1; value2 ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          let value1 := M.alloc (| value1 |) in
          let value2 := M.alloc (| value2 |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (| "core::fmt::builders::debug_tuple_new", [] |),
                  [ M.read (| self |); M.read (| name |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value1 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value2 |) ]
                |)
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugTuple",
                  "finish",
                  []
                |),
                [ builder ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_tuple_field2_finish :
      M.IsAssociatedFunction Self "debug_tuple_field2_finish" debug_tuple_field2_finish.
    
    (*
        pub fn debug_tuple_field3_finish<'b>(
            &'b mut self,
            name: &str,
            value1: &dyn Debug,
            value2: &dyn Debug,
            value3: &dyn Debug,
        ) -> Result {
            let mut builder = builders::debug_tuple_new(self, name);
            builder.field(value1);
            builder.field(value2);
            builder.field(value3);
            builder.finish()
        }
    *)
    Definition debug_tuple_field3_finish
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self; name; value1; value2; value3 ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          let value1 := M.alloc (| value1 |) in
          let value2 := M.alloc (| value2 |) in
          let value3 := M.alloc (| value3 |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (| "core::fmt::builders::debug_tuple_new", [] |),
                  [ M.read (| self |); M.read (| name |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value1 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value2 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value3 |) ]
                |)
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugTuple",
                  "finish",
                  []
                |),
                [ builder ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_tuple_field3_finish :
      M.IsAssociatedFunction Self "debug_tuple_field3_finish" debug_tuple_field3_finish.
    
    (*
        pub fn debug_tuple_field4_finish<'b>(
            &'b mut self,
            name: &str,
            value1: &dyn Debug,
            value2: &dyn Debug,
            value3: &dyn Debug,
            value4: &dyn Debug,
        ) -> Result {
            let mut builder = builders::debug_tuple_new(self, name);
            builder.field(value1);
            builder.field(value2);
            builder.field(value3);
            builder.field(value4);
            builder.finish()
        }
    *)
    Definition debug_tuple_field4_finish
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self; name; value1; value2; value3; value4 ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          let value1 := M.alloc (| value1 |) in
          let value2 := M.alloc (| value2 |) in
          let value3 := M.alloc (| value3 |) in
          let value4 := M.alloc (| value4 |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (| "core::fmt::builders::debug_tuple_new", [] |),
                  [ M.read (| self |); M.read (| name |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value1 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value2 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value3 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value4 |) ]
                |)
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugTuple",
                  "finish",
                  []
                |),
                [ builder ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_tuple_field4_finish :
      M.IsAssociatedFunction Self "debug_tuple_field4_finish" debug_tuple_field4_finish.
    
    (*
        pub fn debug_tuple_field5_finish<'b>(
            &'b mut self,
            name: &str,
            value1: &dyn Debug,
            value2: &dyn Debug,
            value3: &dyn Debug,
            value4: &dyn Debug,
            value5: &dyn Debug,
        ) -> Result {
            let mut builder = builders::debug_tuple_new(self, name);
            builder.field(value1);
            builder.field(value2);
            builder.field(value3);
            builder.field(value4);
            builder.field(value5);
            builder.finish()
        }
    *)
    Definition debug_tuple_field5_finish
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self; name; value1; value2; value3; value4; value5 ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          let value1 := M.alloc (| value1 |) in
          let value2 := M.alloc (| value2 |) in
          let value3 := M.alloc (| value3 |) in
          let value4 := M.alloc (| value4 |) in
          let value5 := M.alloc (| value5 |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (| "core::fmt::builders::debug_tuple_new", [] |),
                  [ M.read (| self |); M.read (| name |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value1 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value2 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value3 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value4 |) ]
                |)
              |) in
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::builders::DebugTuple",
                    "field",
                    []
                  |),
                  [ builder; M.read (| value5 |) ]
                |)
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugTuple",
                  "finish",
                  []
                |),
                [ builder ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_tuple_field5_finish :
      M.IsAssociatedFunction Self "debug_tuple_field5_finish" debug_tuple_field5_finish.
    
    (*
        pub fn debug_tuple_fields_finish<'b>(
            &'b mut self,
            name: &str,
            values: &[&dyn Debug],
        ) -> Result {
            let mut builder = builders::debug_tuple_new(self, name);
            for value in values {
                builder.field(value);
            }
            builder.finish()
        }
    *)
    Definition debug_tuple_fields_finish
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self; name; values ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let name := M.alloc (| name |) in
          let values := M.alloc (| values |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (| "core::fmt::builders::debug_tuple_new", [] |),
                  [ M.read (| self |); M.read (| name |) ]
                |)
              |) 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 "&")
                                  []
                                  [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ]
                              ]
                          ],
                        [],
                        "into_iter",
                        []
                      |),
                      [ M.read (| values |) ]
                    |)
                  |),
                  [
                    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 "&")
                                            []
                                            [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ]
                                        ],
                                      [],
                                      "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 value := M.copy (| γ0_0 |) in
                                      let~ _ :=
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "core::fmt::builders::DebugTuple",
                                              "field",
                                              []
                                            |),
                                            [ builder; M.read (| value |) ]
                                          |)
                                        |) in
                                      M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            M.alloc (| Value.Tuple [] |)))
                        |)))
                  ]
                |)) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugTuple",
                  "finish",
                  []
                |),
                [ builder ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_tuple_fields_finish :
      M.IsAssociatedFunction Self "debug_tuple_fields_finish" debug_tuple_fields_finish.
    
    (*
        pub fn debug_list<'b>(&'b mut self) -> DebugList<'b, 'a> {
            builders::debug_list_new(self)
        }
    *)
    Definition debug_list (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_function (| "core::fmt::builders::debug_list_new", [] |),
            [ M.read (| self |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_list : M.IsAssociatedFunction Self "debug_list" debug_list.
    
    (*
        pub fn debug_set<'b>(&'b mut self) -> DebugSet<'b, 'a> {
            builders::debug_set_new(self)
        }
    *)
    Definition debug_set (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_function (| "core::fmt::builders::debug_set_new", [] |),
            [ M.read (| self |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_set : M.IsAssociatedFunction Self "debug_set" debug_set.
    
    (*
        pub fn debug_map<'b>(&'b mut self) -> DebugMap<'b, 'a> {
            builders::debug_map_new(self)
        }
    *)
    Definition debug_map (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_function (| "core::fmt::builders::debug_map_new", [] |),
            [ M.read (| self |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_debug_map : M.IsAssociatedFunction Self "debug_map" debug_map.
  End Impl_core_fmt_Formatter.
  
  (* StructRecord
    {
      name := "Arguments";
      const_params := [];
      ty_params := [];
      fields :=
        [
          ("pieces",
            Ty.apply
              (Ty.path "&")
              []
              [ Ty.apply (Ty.path "slice") [] [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ] ]);
          ("fmt",
            Ty.apply
              (Ty.path "core::option::Option")
              []
              [
                Ty.apply
                  (Ty.path "&")
                  []
                  [ Ty.apply (Ty.path "slice") [] [ Ty.path "core::fmt::rt::Placeholder" ] ]
              ]);
          ("args",
            Ty.apply
              (Ty.path "&")
              []
              [ Ty.apply (Ty.path "slice") [] [ Ty.path "core::fmt::rt::Argument" ] ])
        ];
    } *)
  
  Module Impl_core_marker_Copy_for_core_fmt_Arguments.
    Definition Self : Ty.t := Ty.path "core::fmt::Arguments".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_core_fmt_Arguments.
  
  Module Impl_core_clone_Clone_for_core_fmt_Arguments.
    Definition Self : Ty.t := Ty.path "core::fmt::Arguments".
    
    (* 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.match_operator (|
                      Value.DeclaredButUndefined,
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (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_core_fmt_Arguments.
  
  Module Impl_core_fmt_Arguments.
    Definition Self : Ty.t := Ty.path "core::fmt::Arguments".
    
    (*
        pub const fn new_const<const N: usize>(pieces: &'a [&'static str; N]) -> Self {
            const { assert!(N <= 1) };
            Arguments { pieces, fmt: None, args: &[] }
        }
    *)
    Definition new_const (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [ N ], [], [ pieces ] =>
        ltac:(M.monadic
          (let pieces := M.alloc (| pieces |) in
          M.read (|
            let~ _ := M.get_constant (| "core::fmt::new_const_discriminant" |) in
            M.alloc (|
              Value.StructRecord
                "core::fmt::Arguments"
                [
                  ("pieces", M.read (| pieces |));
                  ("fmt", Value.StructTuple "core::option::Option::None" []);
                  ("args", M.alloc (| Value.Array [] |))
                ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_new_const : M.IsAssociatedFunction Self "new_const" new_const.
    
    (*
        pub fn new_v1<const P: usize, const A: usize>(
            pieces: &'a [&'static str; P],
            args: &'a [rt::Argument<'a>; A],
        ) -> Arguments<'a> {
            const { assert!(P >= A && P <= A + 1, "invalid args") }
            Arguments { pieces, fmt: None, args }
        }
    *)
    Definition new_v1 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [ P; A ], [], [ pieces; args ] =>
        ltac:(M.monadic
          (let pieces := M.alloc (| pieces |) in
          let args := M.alloc (| args |) in
          M.read (|
            let~ _ := M.get_constant (| "core::fmt::new_v1_discriminant" |) in
            M.alloc (|
              Value.StructRecord
                "core::fmt::Arguments"
                [
                  ("pieces", M.read (| pieces |));
                  ("fmt", Value.StructTuple "core::option::Option::None" []);
                  ("args", M.read (| args |))
                ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_new_v1 : M.IsAssociatedFunction Self "new_v1" new_v1.
    
    (*
        pub fn new_v1_formatted(
            pieces: &'a [&'static str],
            args: &'a [rt::Argument<'a>],
            fmt: &'a [rt::Placeholder],
            _unsafe_arg: rt::UnsafeArg,
        ) -> Arguments<'a> {
            Arguments { pieces, fmt: Some(fmt), args }
        }
    *)
    Definition new_v1_formatted (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ pieces; args; fmt; _unsafe_arg ] =>
        ltac:(M.monadic
          (let pieces := M.alloc (| pieces |) in
          let args := M.alloc (| args |) in
          let fmt := M.alloc (| fmt |) in
          let _unsafe_arg := M.alloc (| _unsafe_arg |) in
          Value.StructRecord
            "core::fmt::Arguments"
            [
              ("pieces", M.read (| pieces |));
              ("fmt", Value.StructTuple "core::option::Option::Some" [ M.read (| fmt |) ]);
              ("args", M.read (| args |))
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_new_v1_formatted :
      M.IsAssociatedFunction Self "new_v1_formatted" new_v1_formatted.
    
    (*
        pub fn estimated_capacity(&self) -> usize {
            let pieces_length: usize = self.pieces.iter().map(|x| x.len()).sum();
    
            if self.args.is_empty() {
                pieces_length
            } else if !self.pieces.is_empty() && self.pieces[0].is_empty() && pieces_length < 16 {
                // If the format string starts with an argument,
                // don't preallocate anything, unless length
                // of pieces is significant.
                0
            } else {
                // There are some arguments, so any additional push
                // will reallocate the string. To avoid that,
                // we're "pre-doubling" the capacity here.
                pieces_length.checked_mul(2).unwrap_or(0)
            }
        }
    *)
    Definition estimated_capacity (ε : 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~ pieces_length :=
              M.alloc (|
                M.call_closure (|
                  M.get_trait_method (|
                    "core::iter::traits::iterator::Iterator",
                    Ty.apply
                      (Ty.path "core::iter::adapters::map::Map")
                      []
                      [
                        Ty.apply
                          (Ty.path "core::slice::iter::Iter")
                          []
                          [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ];
                        Ty.function
                          [
                            Ty.tuple
                              [
                                Ty.apply
                                  (Ty.path "&")
                                  []
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ]
                              ]
                          ]
                          (Ty.path "usize")
                      ],
                    [],
                    "sum",
                    [ Ty.path "usize" ]
                  |),
                  [
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::traits::iterator::Iterator",
                        Ty.apply
                          (Ty.path "core::slice::iter::Iter")
                          []
                          [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ],
                        [],
                        "map",
                        [
                          Ty.path "usize";
                          Ty.function
                            [
                              Ty.tuple
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    []
                                    [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ]
                                ]
                            ]
                            (Ty.path "usize")
                        ]
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              []
                              [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ],
                            "iter",
                            []
                          |),
                          [
                            M.read (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (| self |),
                                "core::fmt::Arguments",
                                "pieces"
                              |)
                            |)
                          ]
                        |);
                        M.closure
                          (fun γ =>
                            ltac:(M.monadic
                              match γ with
                              | [ α0 ] =>
                                ltac:(M.monadic
                                  (M.match_operator (|
                                    M.alloc (| α0 |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let x := M.copy (| γ |) in
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "str",
                                              "len",
                                              []
                                            |),
                                            [ M.read (| M.read (| x |) |) ]
                                          |)))
                                    ]
                                  |)))
                              | _ => M.impossible "wrong number of arguments"
                              end))
                      ]
                    |)
                  ]
                |)
              |) in
            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 "slice") [] [ Ty.path "core::fmt::rt::Argument" ],
                              "is_empty",
                              []
                            |),
                            [
                              M.read (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "core::fmt::Arguments",
                                  "args"
                                |)
                              |)
                            ]
                          |)
                        |)) in
                    let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                    pieces_length));
                fun γ =>
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  LogicalOp.and (|
                                    LogicalOp.and (|
                                      UnOp.not (|
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "slice")
                                              []
                                              [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ],
                                            "is_empty",
                                            []
                                          |),
                                          [
                                            M.read (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| self |),
                                                "core::fmt::Arguments",
                                                "pieces"
                                              |)
                                            |)
                                          ]
                                        |)
                                      |),
                                      ltac:(M.monadic
                                        (M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "str",
                                            "is_empty",
                                            []
                                          |),
                                          [
                                            M.read (|
                                              M.SubPointer.get_array_field (|
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| self |),
                                                    "core::fmt::Arguments",
                                                    "pieces"
                                                  |)
                                                |),
                                                M.alloc (| Value.Integer IntegerKind.Usize 0 |)
                                              |)
                                            |)
                                          ]
                                        |)))
                                    |),
                                    ltac:(M.monadic
                                      (BinOp.lt (|
                                        M.read (| pieces_length |),
                                        Value.Integer IntegerKind.Usize 16
                                      |)))
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            M.alloc (| Value.Integer IntegerKind.Usize 0 |)));
                        fun γ =>
                          ltac:(M.monadic
                            (M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "usize" ],
                                  "unwrap_or",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "usize",
                                      "checked_mul",
                                      []
                                    |),
                                    [ M.read (| pieces_length |); Value.Integer IntegerKind.Usize 2
                                    ]
                                  |);
                                  Value.Integer IntegerKind.Usize 0
                                ]
                              |)
                            |)))
                      ]
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_estimated_capacity :
      M.IsAssociatedFunction Self "estimated_capacity" estimated_capacity.
    (*
        pub const fn as_str(&self) -> Option<&'static str> {
            match (self.pieces, self.args) {
                ([], []) => Some(""),
                ([s], []) => Some(s),
                _ => None,
            }
        }
    *)
    Definition as_str (ε : 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 (|
              M.alloc (|
                Value.Tuple
                  [
                    M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "core::fmt::Arguments",
                        "pieces"
                      |)
                    |);
                    M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "core::fmt::Arguments",
                        "args"
                      |)
                    |)
                  ]
              |),
              [
                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 γ0_1 := M.read (| γ0_1 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::option::Option::Some"
                        [ M.read (| Value.String "" |) ]
                    |)));
                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_slice_index (| γ0_0, 0 |) in
                    let s := M.alloc (| γ2_0 |) in
                    let γ0_1 := M.read (| γ0_1 |) in
                    M.alloc (|
                      Value.StructTuple "core::option::Option::Some" [ M.read (| M.read (| s |) |) ]
                    |)));
                fun γ =>
                  ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_as_str : M.IsAssociatedFunction Self "as_str" as_str.
    
    (*
        fn as_statically_known_str(&self) -> Option<&'static str> {
            let s = self.as_str();
            if core::intrinsics::is_val_statically_known(s.is_some()) { s } else { None }
        }
    *)
    Definition as_statically_known_str (ε : 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~ s :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Arguments", "as_str", [] |),
                  [ M.read (| self |) ]
                |)
              |) in
            M.match_operator (|
              M.alloc (| Value.Tuple [] |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ :=
                      M.use
                        (M.alloc (|
                          M.call_closure (|
                            M.get_function (|
                              "core::intrinsics::is_val_statically_known",
                              [ Ty.path "bool" ]
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "core::option::Option")
                                    []
                                    [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ],
                                  "is_some",
                                  []
                                |),
                                [ s ]
                              |)
                            ]
                          |)
                        |)) in
                    let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                    s));
                fun γ =>
                  ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_as_statically_known_str :
      M.IsAssociatedFunction Self "as_statically_known_str" as_statically_known_str.
  End Impl_core_fmt_Arguments.
  
  
  Module Impl_core_marker_Send_for_core_fmt_Arguments.
    Definition Self : Ty.t := Ty.path "core::fmt::Arguments".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Send"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Send_for_core_fmt_Arguments.
  
  Module Impl_core_marker_Sync_for_core_fmt_Arguments.
    Definition Self : Ty.t := Ty.path "core::fmt::Arguments".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Sync"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Sync_for_core_fmt_Arguments.
  
  Module Impl_core_fmt_Debug_for_core_fmt_Arguments.
    Definition Self : Ty.t := Ty.path "core::fmt::Arguments".
    
    (*
        fn fmt(&self, fmt: &mut Formatter<'_>) -> Result {
            Display::fmt(self, fmt)
        }
    *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; fmt ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let fmt := M.alloc (| fmt |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::fmt::Display",
              Ty.path "core::fmt::Arguments",
              [],
              "fmt",
              []
            |),
            [ M.read (| self |); M.read (| fmt |) ]
          |)))
      | _, _, _ => 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_core_fmt_Arguments.
  
  Module Impl_core_fmt_Display_for_core_fmt_Arguments.
    Definition Self : Ty.t := Ty.path "core::fmt::Arguments".
    
    (*
        fn fmt(&self, fmt: &mut Formatter<'_>) -> Result {
            write(fmt.buf, *self)
        }
    *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; fmt ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let fmt := M.alloc (| fmt |) in
          M.call_closure (|
            M.get_function (| "core::fmt::write", [] |),
            [
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| fmt |),
                  "core::fmt::Formatter",
                  "buf"
                |)
              |);
              M.read (| M.read (| self |) |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_core_fmt_Arguments.
  
  (* Trait *)
  (* Empty module 'Debug' *)
  
  (* Trait *)
  (* Empty module 'Display' *)
  
  (* Trait *)
  (* Empty module 'Octal' *)
  
  (* Trait *)
  (* Empty module 'Binary' *)
  
  (* Trait *)
  (* Empty module 'LowerHex' *)
  
  (* Trait *)
  (* Empty module 'UpperHex' *)
  
  (* Trait *)
  (* Empty module 'Pointer' *)
  
  (* Trait *)
  (* Empty module 'LowerExp' *)
  
  (* Trait *)
  (* Empty module 'UpperExp' *)
  
  (*
  pub fn write(output: &mut dyn Write, args: Arguments<'_>) -> Result {
      let mut formatter = Formatter::new(output);
      let mut idx = 0;
  
      match args.fmt {
          None => {
              // We can use default formatting parameters for all arguments.
              for (i, arg) in args.args.iter().enumerate() {
                  // SAFETY: args.args and args.pieces come from the same Arguments,
                  // which guarantees the indexes are always within bounds.
                  let piece = unsafe { args.pieces.get_unchecked(i) };
                  if !piece.is_empty() {
                      formatter.buf.write_str( *piece)?;
                  }
  
                  // SAFETY: There are no formatting parameters and hence no
                  // count arguments.
                  unsafe {
                      arg.fmt(&mut formatter)?;
                  }
                  idx += 1;
              }
          }
          Some(fmt) => {
              // Every spec has a corresponding argument that is preceded by
              // a string piece.
              for (i, arg) in fmt.iter().enumerate() {
                  // SAFETY: fmt and args.pieces come from the same Arguments,
                  // which guarantees the indexes are always within bounds.
                  let piece = unsafe { args.pieces.get_unchecked(i) };
                  if !piece.is_empty() {
                      formatter.buf.write_str( *piece)?;
                  }
                  // SAFETY: arg and args.args come from the same Arguments,
                  // which guarantees the indexes are always within bounds.
                  unsafe { run(&mut formatter, arg, args.args) }?;
                  idx += 1;
              }
          }
      }
  
      // There can be only one trailing string piece left.
      if let Some(piece) = args.pieces.get(idx) {
          formatter.buf.write_str( *piece)?;
      }
  
      Ok(())
  }
  *)
  Definition write (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ output; args ] =>
      ltac:(M.monadic
        (let output := M.alloc (| output |) in
        let args := M.alloc (| args |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ formatter :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (| Ty.path "core::fmt::Formatter", "new", [] |),
                    [ M.read (| output |) ]
                  |)
                |) in
              let~ idx := M.alloc (| Value.Integer IntegerKind.Usize 0 |) in
              let~ _ :=
                M.match_operator (|
                  M.SubPointer.get_struct_record_field (| args, "core::fmt::Arguments", "fmt" |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                        M.use
                          (M.match_operator (|
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::iter::traits::collect::IntoIterator",
                                  Ty.apply
                                    (Ty.path "core::iter::adapters::enumerate::Enumerate")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "core::slice::iter::Iter")
                                        []
                                        [ Ty.path "core::fmt::rt::Argument" ]
                                    ],
                                  [],
                                  "into_iter",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::traits::iterator::Iterator",
                                      Ty.apply
                                        (Ty.path "core::slice::iter::Iter")
                                        []
                                        [ Ty.path "core::fmt::rt::Argument" ],
                                      [],
                                      "enumerate",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "slice")
                                            []
                                            [ Ty.path "core::fmt::rt::Argument" ],
                                          "iter",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              args,
                                              "core::fmt::Arguments",
                                              "args"
                                            |)
                                          |)
                                        ]
                                      |)
                                    ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              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::enumerate::Enumerate")
                                                  []
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::slice::iter::Iter")
                                                      []
                                                      [ Ty.path "core::fmt::rt::Argument" ]
                                                  ],
                                                [],
                                                "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 γ1_0 :=
                                                  M.SubPointer.get_tuple_field (| γ0_0, 0 |) in
                                                let γ1_1 :=
                                                  M.SubPointer.get_tuple_field (| γ0_0, 1 |) in
                                                let i := M.copy (| γ1_0 |) in
                                                let arg := M.copy (| γ1_1 |) in
                                                let~ piece :=
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path "slice")
                                                          []
                                                          [
                                                            Ty.apply
                                                              (Ty.path "&")
                                                              []
                                                              [ Ty.path "str" ]
                                                          ],
                                                        "get_unchecked",
                                                        [ Ty.path "usize" ]
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            args,
                                                            "core::fmt::Arguments",
                                                            "pieces"
                                                          |)
                                                        |);
                                                        M.read (| i |)
                                                      ]
                                                    |)
                                                  |) in
                                                let~ _ :=
                                                  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 "str",
                                                                      "is_empty",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (|
                                                                        M.read (| piece |)
                                                                      |)
                                                                    ]
                                                                  |)
                                                                |)
                                                              |)) in
                                                          let _ :=
                                                            M.is_constant_or_break_match (|
                                                              M.read (| γ |),
                                                              Value.Bool true
                                                            |) 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.path "core::fmt::Error"
                                                                      ],
                                                                    [],
                                                                    "branch",
                                                                    []
                                                                  |),
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_trait_method (|
                                                                        "core::fmt::Write",
                                                                        Ty.dyn
                                                                          [
                                                                            ("core::fmt::Write::Trait",
                                                                              [])
                                                                          ],
                                                                        [],
                                                                        "write_str",
                                                                        []
                                                                      |),
                                                                      [
                                                                        M.read (|
                                                                          M.SubPointer.get_struct_record_field (|
                                                                            formatter,
                                                                            "core::fmt::Formatter",
                                                                            "buf"
                                                                          |)
                                                                        |);
                                                                        M.read (|
                                                                          M.read (| piece |)
                                                                        |)
                                                                      ]
                                                                    |)
                                                                  ]
                                                                |)
                                                              |),
                                                              [
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let γ0_0 :=
                                                                      M.SubPointer.get_struct_tuple_field (|
                                                                        γ,
                                                                        "core::ops::control_flow::ControlFlow::Break",
                                                                        0
                                                                      |) in
                                                                    let residual :=
                                                                      M.copy (| γ0_0 |) in
                                                                    M.alloc (|
                                                                      M.never_to_any (|
                                                                        M.read (|
                                                                          M.return_ (|
                                                                            M.call_closure (|
                                                                              M.get_trait_method (|
                                                                                "core::ops::try_trait::FromResidual",
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.tuple [];
                                                                                    Ty.path
                                                                                      "core::fmt::Error"
                                                                                  ],
                                                                                [
                                                                                  Ty.apply
                                                                                    (Ty.path
                                                                                      "core::result::Result")
                                                                                    []
                                                                                    [
                                                                                      Ty.path
                                                                                        "core::convert::Infallible";
                                                                                      Ty.path
                                                                                        "core::fmt::Error"
                                                                                    ]
                                                                                ],
                                                                                "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
                                                          M.alloc (| Value.Tuple [] |)));
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (M.alloc (| Value.Tuple [] |)))
                                                    ]
                                                  |) in
                                                let~ _ :=
                                                  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.path "core::fmt::Error"
                                                              ],
                                                            [],
                                                            "branch",
                                                            []
                                                          |),
                                                          [
                                                            M.call_closure (|
                                                              M.get_associated_function (|
                                                                Ty.path "core::fmt::rt::Argument",
                                                                "fmt",
                                                                []
                                                              |),
                                                              [ M.read (| arg |); formatter ]
                                                            |)
                                                          ]
                                                        |)
                                                      |),
                                                      [
                                                        fun γ =>
                                                          ltac:(M.monadic
                                                            (let γ0_0 :=
                                                              M.SubPointer.get_struct_tuple_field (|
                                                                γ,
                                                                "core::ops::control_flow::ControlFlow::Break",
                                                                0
                                                              |) in
                                                            let residual := M.copy (| γ0_0 |) in
                                                            M.alloc (|
                                                              M.never_to_any (|
                                                                M.read (|
                                                                  M.return_ (|
                                                                    M.call_closure (|
                                                                      M.get_trait_method (|
                                                                        "core::ops::try_trait::FromResidual",
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::result::Result")
                                                                          []
                                                                          [
                                                                            Ty.tuple [];
                                                                            Ty.path
                                                                              "core::fmt::Error"
                                                                          ],
                                                                        [
                                                                          Ty.apply
                                                                            (Ty.path
                                                                              "core::result::Result")
                                                                            []
                                                                            [
                                                                              Ty.path
                                                                                "core::convert::Infallible";
                                                                              Ty.path
                                                                                "core::fmt::Error"
                                                                            ]
                                                                        ],
                                                                        "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
                                                  M.alloc (| Value.Tuple [] |) in
                                                let~ _ :=
                                                  let β := idx in
                                                  M.write (|
                                                    β,
                                                    BinOp.Wrap.add (|
                                                      M.read (| β |),
                                                      Value.Integer IntegerKind.Usize 1
                                                    |)
                                                  |) in
                                                M.alloc (| Value.Tuple [] |)))
                                          ]
                                        |) in
                                      M.alloc (| Value.Tuple [] |)))
                                  |)))
                            ]
                          |))));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::option::Option::Some",
                            0
                          |) in
                        let fmt := M.copy (| γ0_0 |) in
                        M.use
                          (M.match_operator (|
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::iter::traits::collect::IntoIterator",
                                  Ty.apply
                                    (Ty.path "core::iter::adapters::enumerate::Enumerate")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "core::slice::iter::Iter")
                                        []
                                        [ Ty.path "core::fmt::rt::Placeholder" ]
                                    ],
                                  [],
                                  "into_iter",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::traits::iterator::Iterator",
                                      Ty.apply
                                        (Ty.path "core::slice::iter::Iter")
                                        []
                                        [ Ty.path "core::fmt::rt::Placeholder" ],
                                      [],
                                      "enumerate",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "slice")
                                            []
                                            [ Ty.path "core::fmt::rt::Placeholder" ],
                                          "iter",
                                          []
                                        |),
                                        [ M.read (| fmt |) ]
                                      |)
                                    ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              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::enumerate::Enumerate")
                                                  []
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::slice::iter::Iter")
                                                      []
                                                      [ Ty.path "core::fmt::rt::Placeholder" ]
                                                  ],
                                                [],
                                                "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 γ1_0 :=
                                                  M.SubPointer.get_tuple_field (| γ0_0, 0 |) in
                                                let γ1_1 :=
                                                  M.SubPointer.get_tuple_field (| γ0_0, 1 |) in
                                                let i := M.copy (| γ1_0 |) in
                                                let arg := M.copy (| γ1_1 |) in
                                                let~ piece :=
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path "slice")
                                                          []
                                                          [
                                                            Ty.apply
                                                              (Ty.path "&")
                                                              []
                                                              [ Ty.path "str" ]
                                                          ],
                                                        "get_unchecked",
                                                        [ Ty.path "usize" ]
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            args,
                                                            "core::fmt::Arguments",
                                                            "pieces"
                                                          |)
                                                        |);
                                                        M.read (| i |)
                                                      ]
                                                    |)
                                                  |) in
                                                let~ _ :=
                                                  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 "str",
                                                                      "is_empty",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (|
                                                                        M.read (| piece |)
                                                                      |)
                                                                    ]
                                                                  |)
                                                                |)
                                                              |)) in
                                                          let _ :=
                                                            M.is_constant_or_break_match (|
                                                              M.read (| γ |),
                                                              Value.Bool true
                                                            |) 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.path "core::fmt::Error"
                                                                      ],
                                                                    [],
                                                                    "branch",
                                                                    []
                                                                  |),
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_trait_method (|
                                                                        "core::fmt::Write",
                                                                        Ty.dyn
                                                                          [
                                                                            ("core::fmt::Write::Trait",
                                                                              [])
                                                                          ],
                                                                        [],
                                                                        "write_str",
                                                                        []
                                                                      |),
                                                                      [
                                                                        M.read (|
                                                                          M.SubPointer.get_struct_record_field (|
                                                                            formatter,
                                                                            "core::fmt::Formatter",
                                                                            "buf"
                                                                          |)
                                                                        |);
                                                                        M.read (|
                                                                          M.read (| piece |)
                                                                        |)
                                                                      ]
                                                                    |)
                                                                  ]
                                                                |)
                                                              |),
                                                              [
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let γ0_0 :=
                                                                      M.SubPointer.get_struct_tuple_field (|
                                                                        γ,
                                                                        "core::ops::control_flow::ControlFlow::Break",
                                                                        0
                                                                      |) in
                                                                    let residual :=
                                                                      M.copy (| γ0_0 |) in
                                                                    M.alloc (|
                                                                      M.never_to_any (|
                                                                        M.read (|
                                                                          M.return_ (|
                                                                            M.call_closure (|
                                                                              M.get_trait_method (|
                                                                                "core::ops::try_trait::FromResidual",
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.tuple [];
                                                                                    Ty.path
                                                                                      "core::fmt::Error"
                                                                                  ],
                                                                                [
                                                                                  Ty.apply
                                                                                    (Ty.path
                                                                                      "core::result::Result")
                                                                                    []
                                                                                    [
                                                                                      Ty.path
                                                                                        "core::convert::Infallible";
                                                                                      Ty.path
                                                                                        "core::fmt::Error"
                                                                                    ]
                                                                                ],
                                                                                "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
                                                          M.alloc (| Value.Tuple [] |)));
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (M.alloc (| Value.Tuple [] |)))
                                                    ]
                                                  |) 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.path "core::fmt::Error"
                                                            ],
                                                          [],
                                                          "branch",
                                                          []
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_function (|
                                                              "core::fmt::run",
                                                              []
                                                            |),
                                                            [
                                                              formatter;
                                                              M.read (| arg |);
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  args,
                                                                  "core::fmt::Arguments",
                                                                  "args"
                                                                |)
                                                              |)
                                                            ]
                                                          |)
                                                        ]
                                                      |)
                                                    |),
                                                    [
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (let γ0_0 :=
                                                            M.SubPointer.get_struct_tuple_field (|
                                                              γ,
                                                              "core::ops::control_flow::ControlFlow::Break",
                                                              0
                                                            |) in
                                                          let residual := M.copy (| γ0_0 |) in
                                                          M.alloc (|
                                                            M.never_to_any (|
                                                              M.read (|
                                                                M.return_ (|
                                                                  M.call_closure (|
                                                                    M.get_trait_method (|
                                                                      "core::ops::try_trait::FromResidual",
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.tuple [];
                                                                          Ty.path "core::fmt::Error"
                                                                        ],
                                                                      [
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::result::Result")
                                                                          []
                                                                          [
                                                                            Ty.path
                                                                              "core::convert::Infallible";
                                                                            Ty.path
                                                                              "core::fmt::Error"
                                                                          ]
                                                                      ],
                                                                      "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~ _ :=
                                                  let β := idx in
                                                  M.write (|
                                                    β,
                                                    BinOp.Wrap.add (|
                                                      M.read (| β |),
                                                      Value.Integer IntegerKind.Usize 1
                                                    |)
                                                  |) in
                                                M.alloc (| Value.Tuple [] |)))
                                          ]
                                        |) in
                                      M.alloc (| Value.Tuple [] |)))
                                  |)))
                            ]
                          |))))
                  ]
                |) in
              let~ _ :=
                M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "slice")
                                  []
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ],
                                "get",
                                [ Ty.path "usize" ]
                              |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    args,
                                    "core::fmt::Arguments",
                                    "pieces"
                                  |)
                                |);
                                M.read (| idx |)
                              ]
                            |)
                          |) in
                        let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::option::Option::Some",
                            0
                          |) in
                        let piece := M.copy (| γ0_0 |) 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.path "core::fmt::Error" ],
                                  [],
                                  "branch",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::fmt::Write",
                                      Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                                      [],
                                      "write_str",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          formatter,
                                          "core::fmt::Formatter",
                                          "buf"
                                        |)
                                      |);
                                      M.read (| M.read (| piece |) |)
                                    ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::ops::control_flow::ControlFlow::Break",
                                      0
                                    |) in
                                  let residual := M.copy (| γ0_0 |) in
                                  M.alloc (|
                                    M.never_to_any (|
                                      M.read (|
                                        M.return_ (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::FromResidual",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                              [
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "core::convert::Infallible";
                                                    Ty.path "core::fmt::Error"
                                                  ]
                                              ],
                                              "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
                        M.alloc (| Value.Tuple [] |)));
                    fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                  ]
                |) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_write : M.IsFunction "core::fmt::write" write.
  
  (*
  unsafe fn run(fmt: &mut Formatter<'_>, arg: &rt::Placeholder, args: &[rt::Argument<'_>]) -> Result {
      fmt.fill = arg.fill;
      fmt.align = arg.align;
      fmt.flags = arg.flags;
      // SAFETY: arg and args come from the same Arguments,
      // which guarantees the indexes are always within bounds.
      unsafe {
          fmt.width = getcount(args, &arg.width);
          fmt.precision = getcount(args, &arg.precision);
      }
  
      // Extract the correct argument
      debug_assert!(arg.position < args.len());
      // SAFETY: arg and args come from the same Arguments,
      // which guarantees its index is always within bounds.
      let value = unsafe { args.get_unchecked(arg.position) };
  
      // Then actually do some printing
      // SAFETY: this is a placeholder argument.
      unsafe { value.fmt(fmt) }
  }
  *)
  Definition run (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ fmt; arg; args ] =>
      ltac:(M.monadic
        (let fmt := M.alloc (| fmt |) in
        let arg := M.alloc (| arg |) in
        let args := M.alloc (| args |) in
        M.read (|
          let~ _ :=
            M.write (|
              M.SubPointer.get_struct_record_field (|
                M.read (| fmt |),
                "core::fmt::Formatter",
                "fill"
              |),
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| arg |),
                  "core::fmt::rt::Placeholder",
                  "fill"
                |)
              |)
            |) in
          let~ _ :=
            M.write (|
              M.SubPointer.get_struct_record_field (|
                M.read (| fmt |),
                "core::fmt::Formatter",
                "align"
              |),
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| arg |),
                  "core::fmt::rt::Placeholder",
                  "align"
                |)
              |)
            |) in
          let~ _ :=
            M.write (|
              M.SubPointer.get_struct_record_field (|
                M.read (| fmt |),
                "core::fmt::Formatter",
                "flags"
              |),
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| arg |),
                  "core::fmt::rt::Placeholder",
                  "flags"
                |)
              |)
            |) in
          let~ _ :=
            let~ _ :=
              M.write (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| fmt |),
                  "core::fmt::Formatter",
                  "width"
                |),
                M.call_closure (|
                  M.get_function (| "core::fmt::getcount", [] |),
                  [
                    M.read (| args |);
                    M.SubPointer.get_struct_record_field (|
                      M.read (| arg |),
                      "core::fmt::rt::Placeholder",
                      "width"
                    |)
                  ]
                |)
              |) in
            let~ _ :=
              M.write (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| fmt |),
                  "core::fmt::Formatter",
                  "precision"
                |),
                M.call_closure (|
                  M.get_function (| "core::fmt::getcount", [] |),
                  [
                    M.read (| args |);
                    M.SubPointer.get_struct_record_field (|
                      M.read (| arg |),
                      "core::fmt::rt::Placeholder",
                      "precision"
                    |)
                  ]
                |)
              |) in
            M.alloc (| Value.Tuple [] |) in
          let~ _ :=
            M.match_operator (|
              M.alloc (| Value.Tuple [] |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.use (M.alloc (| Value.Bool true |)) in
                    let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                    let~ _ :=
                      M.match_operator (|
                        M.alloc (| Value.Tuple [] |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ :=
                                M.use
                                  (M.alloc (|
                                    UnOp.not (|
                                      BinOp.lt (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| arg |),
                                            "core::fmt::rt::Placeholder",
                                            "position"
                                          |)
                                        |),
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "slice")
                                              []
                                              [ Ty.path "core::fmt::rt::Argument" ],
                                            "len",
                                            []
                                          |),
                                          [ M.read (| args |) ]
                                        |)
                                      |)
                                    |)
                                  |)) in
                              let _ :=
                                M.is_constant_or_break_match (|
                                  M.read (| γ |),
                                  Value.Bool true
                                |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.call_closure (|
                                    M.get_function (| "core::panicking::panic", [] |),
                                    [
                                      M.read (|
                                        Value.String "assertion failed: arg.position < args.len()"
                                      |)
                                    ]
                                  |)
                                |)
                              |)));
                          fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                        ]
                      |) in
                    M.alloc (| Value.Tuple [] |)));
                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
              ]
            |) in
          let~ value :=
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply (Ty.path "slice") [] [ Ty.path "core::fmt::rt::Argument" ],
                  "get_unchecked",
                  [ Ty.path "usize" ]
                |),
                [
                  M.read (| args |);
                  M.read (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (| arg |),
                      "core::fmt::rt::Placeholder",
                      "position"
                    |)
                  |)
                ]
              |)
            |) in
          M.alloc (|
            M.call_closure (|
              M.get_associated_function (| Ty.path "core::fmt::rt::Argument", "fmt", [] |),
              [ M.read (| value |); M.read (| fmt |) ]
            |)
          |)
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_run : M.IsFunction "core::fmt::run" run.
  
  (*
  unsafe fn getcount(args: &[rt::Argument<'_>], cnt: &rt::Count) -> Option<usize> {
      match *cnt {
          rt::Count::Is(n) => Some(n),
          rt::Count::Implied => None,
          rt::Count::Param(i) => {
              debug_assert!(i < args.len());
              // SAFETY: cnt and args come from the same Arguments,
              // which guarantees this index is always within bounds.
              unsafe { args.get_unchecked(i).as_usize() }
          }
      }
  }
  *)
  Definition getcount (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ args; cnt ] =>
      ltac:(M.monadic
        (let args := M.alloc (| args |) in
        let cnt := M.alloc (| cnt |) in
        M.read (|
          M.match_operator (|
            M.read (| cnt |),
            [
              fun γ =>
                ltac:(M.monadic
                  (let γ0_0 :=
                    M.SubPointer.get_struct_tuple_field (| γ, "core::fmt::rt::Count::Is", 0 |) in
                  let n := M.copy (| γ0_0 |) in
                  M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] |)));
              fun γ =>
                ltac:(M.monadic
                  (let _ := M.is_struct_tuple (| γ, "core::fmt::rt::Count::Implied" |) in
                  M.alloc (| Value.StructTuple "core::option::Option::None" [] |)));
              fun γ =>
                ltac:(M.monadic
                  (let γ0_0 :=
                    M.SubPointer.get_struct_tuple_field (| γ, "core::fmt::rt::Count::Param", 0 |) in
                  let i := M.copy (| γ0_0 |) in
                  let~ _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := M.use (M.alloc (| Value.Bool true |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ _ :=
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.alloc (|
                                            UnOp.not (|
                                              BinOp.lt (|
                                                M.read (| i |),
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "slice")
                                                      []
                                                      [ Ty.path "core::fmt::rt::Argument" ],
                                                    "len",
                                                    []
                                                  |),
                                                  [ M.read (| args |) ]
                                                |)
                                              |)
                                            |)
                                          |)) in
                                      let _ :=
                                        M.is_constant_or_break_match (|
                                          M.read (| γ |),
                                          Value.Bool true
                                        |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.call_closure (|
                                            M.get_function (| "core::panicking::panic", [] |),
                                            [
                                              M.read (|
                                                Value.String "assertion failed: i < args.len()"
                                              |)
                                            ]
                                          |)
                                        |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "core::fmt::rt::Argument",
                        "as_usize",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply (Ty.path "slice") [] [ Ty.path "core::fmt::rt::Argument" ],
                            "get_unchecked",
                            [ Ty.path "usize" ]
                          |),
                          [ M.read (| args |); M.read (| i |) ]
                        |)
                      ]
                    |)
                  |)))
            ]
          |)
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_getcount : M.IsFunction "core::fmt::getcount" getcount.
  
  (* StructRecord
    {
      name := "PostPadding";
      const_params := [];
      ty_params := [];
      fields := [ ("fill", Ty.path "char"); ("padding", Ty.path "usize") ];
    } *)
  
  Module Impl_core_fmt_PostPadding.
    Definition Self : Ty.t := Ty.path "core::fmt::PostPadding".
    
    (*
        fn new(fill: char, padding: usize) -> PostPadding {
            PostPadding { fill, padding }
        }
    *)
    Definition new (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ fill; padding ] =>
        ltac:(M.monadic
          (let fill := M.alloc (| fill |) in
          let padding := M.alloc (| padding |) in
          Value.StructRecord
            "core::fmt::PostPadding"
            [ ("fill", M.read (| fill |)); ("padding", M.read (| padding |)) ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new.
    
    (*
        pub(crate) fn write(self, f: &mut Formatter<'_>) -> Result {
            for _ in 0..self.padding {
                f.buf.write_char(self.fill)?;
            }
            Ok(())
        }
    *)
    Definition write (ε : 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.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ _ :=
                  M.use
                    (M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::traits::collect::IntoIterator",
                            Ty.apply (Ty.path "core::ops::range::Range") [] [ Ty.path "usize" ],
                            [],
                            "into_iter",
                            []
                          |),
                          [
                            Value.StructRecord
                              "core::ops::range::Range"
                              [
                                ("start", Value.Integer IntegerKind.Usize 0);
                                ("end_",
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      self,
                                      "core::fmt::PostPadding",
                                      "padding"
                                    |)
                                  |))
                              ]
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let iter := M.copy (| γ |) in
                            M.loop (|
                              ltac:(M.monadic
                                (let~ _ :=
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::iter::traits::iterator::Iterator",
                                          Ty.apply
                                            (Ty.path "core::ops::range::Range")
                                            []
                                            [ Ty.path "usize" ],
                                          [],
                                          "next",
                                          []
                                        |),
                                        [ iter ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let _ :=
                                            M.is_struct_tuple (|
                                              γ,
                                              "core::option::Option::None"
                                            |) in
                                          M.alloc (|
                                            M.never_to_any (| M.read (| M.break (||) |) |)
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::option::Option::Some",
                                              0
                                            |) in
                                          let~ _ :=
                                            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.path "core::fmt::Error" ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::fmt::Write",
                                                        Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                                                        [],
                                                        "write_char",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (| f |),
                                                            "core::fmt::Formatter",
                                                            "buf"
                                                          |)
                                                        |);
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            self,
                                                            "core::fmt::PostPadding",
                                                            "fill"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::ops::control_flow::ControlFlow::Break",
                                                        0
                                                      |) in
                                                    let residual := M.copy (| γ0_0 |) in
                                                    M.alloc (|
                                                      M.never_to_any (|
                                                        M.read (|
                                                          M.return_ (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "core::ops::try_trait::FromResidual",
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  []
                                                                  [
                                                                    Ty.tuple [];
                                                                    Ty.path "core::fmt::Error"
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.path "core::fmt::Error"
                                                                    ]
                                                                ],
                                                                "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
                                          M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |) in
                                M.alloc (| Value.Tuple [] |)))
                            |)))
                      ]
                    |)) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_write : M.IsAssociatedFunction Self "write" write.
  End Impl_core_fmt_PostPadding.
  
  
  Module Impl_core_fmt_Write_for_core_fmt_Formatter.
    Definition Self : Ty.t := Ty.path "core::fmt::Formatter".
    
    (*
        fn write_str(&mut self, s: &str) -> Result {
            self.buf.write_str(s)
        }
    *)
    Definition write_str (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; s ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let s := M.alloc (| s |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::fmt::Write",
              Ty.dyn [ ("core::fmt::Write::Trait", []) ],
              [],
              "write_str",
              []
            |),
            [
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "core::fmt::Formatter",
                  "buf"
                |)
              |);
              M.read (| s |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn write_char(&mut self, c: char) -> Result {
            self.buf.write_char(c)
        }
    *)
    Definition write_char (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; c ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let c := M.alloc (| c |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::fmt::Write",
              Ty.dyn [ ("core::fmt::Write::Trait", []) ],
              [],
              "write_char",
              []
            |),
            [
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "core::fmt::Formatter",
                  "buf"
                |)
              |);
              M.read (| c |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn write_fmt(&mut self, args: Arguments<'_>) -> Result {
            if let Some(s) = args.as_statically_known_str() {
                self.buf.write_str(s)
            } else {
                write(self.buf, args)
            }
        }
    *)
    Definition write_fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; args ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let args := M.alloc (| args |) 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.path "core::fmt::Arguments",
                            "as_statically_known_str",
                            []
                          |),
                          [ args ]
                        |)
                      |) in
                    let γ0_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::option::Option::Some",
                        0
                      |) in
                    let s := M.copy (| γ0_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::fmt::Write",
                          Ty.dyn [ ("core::fmt::Write::Trait", []) ],
                          [],
                          "write_str",
                          []
                        |),
                        [
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::fmt::Formatter",
                              "buf"
                            |)
                          |);
                          M.read (| s |)
                        ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (M.alloc (|
                      M.call_closure (|
                        M.get_function (| "core::fmt::write", [] |),
                        [
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::fmt::Formatter",
                              "buf"
                            |)
                          |);
                          M.read (| args |)
                        ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Write"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("write_str", InstanceField.Method write_str);
          ("write_char", InstanceField.Method write_char);
          ("write_fmt", InstanceField.Method write_fmt)
        ].
  End Impl_core_fmt_Write_for_core_fmt_Formatter.
  
  Module Impl_core_fmt_Display_for_core_fmt_Error.
    Definition Self : Ty.t := Ty.path "core::fmt::Error".
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            Display::fmt("an error occurred when formatting an argument", f)
        }
    *)
    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_trait_method (| "core::fmt::Display", Ty.path "str", [], "fmt", [] |),
            [
              M.read (| Value.String "an error occurred when formatting an argument" |);
              M.read (| f |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_core_fmt_Error.
  
  Module Impl_core_fmt_Debug_where_core_marker_Sized_T_where_core_fmt_Debug_T_for_ref__T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Debug", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_marker_Sized_T_where_core_fmt_Debug_T_for_ref__T.
  
  Module Impl_core_fmt_Debug_where_core_marker_Sized_T_where_core_fmt_Debug_T_for_ref_mut_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Debug", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_marker_Sized_T_where_core_fmt_Debug_T_for_ref_mut_T.
  
  Module Impl_core_fmt_Display_where_core_marker_Sized_T_where_core_fmt_Display_T_for_ref__T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Display", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Display"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Display_where_core_marker_Sized_T_where_core_fmt_Display_T_for_ref__T.
  
  Module Impl_core_fmt_Display_where_core_marker_Sized_T_where_core_fmt_Display_T_for_ref_mut_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Display", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Display"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Display_where_core_marker_Sized_T_where_core_fmt_Display_T_for_ref_mut_T.
  
  Module Impl_core_fmt_Octal_where_core_marker_Sized_T_where_core_fmt_Octal_T_for_ref__T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Octal", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Octal"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Octal_where_core_marker_Sized_T_where_core_fmt_Octal_T_for_ref__T.
  
  Module Impl_core_fmt_Octal_where_core_marker_Sized_T_where_core_fmt_Octal_T_for_ref_mut_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Octal", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Octal"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Octal_where_core_marker_Sized_T_where_core_fmt_Octal_T_for_ref_mut_T.
  
  Module Impl_core_fmt_Binary_where_core_marker_Sized_T_where_core_fmt_Binary_T_for_ref__T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Binary", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Binary"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Binary_where_core_marker_Sized_T_where_core_fmt_Binary_T_for_ref__T.
  
  Module Impl_core_fmt_Binary_where_core_marker_Sized_T_where_core_fmt_Binary_T_for_ref_mut_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Binary", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Binary"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Binary_where_core_marker_Sized_T_where_core_fmt_Binary_T_for_ref_mut_T.
  
  Module Impl_core_fmt_LowerHex_where_core_marker_Sized_T_where_core_fmt_LowerHex_T_for_ref__T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::LowerHex", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::LowerHex"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_LowerHex_where_core_marker_Sized_T_where_core_fmt_LowerHex_T_for_ref__T.
  
  Module Impl_core_fmt_LowerHex_where_core_marker_Sized_T_where_core_fmt_LowerHex_T_for_ref_mut_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::LowerHex", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::LowerHex"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_LowerHex_where_core_marker_Sized_T_where_core_fmt_LowerHex_T_for_ref_mut_T.
  
  Module Impl_core_fmt_UpperHex_where_core_marker_Sized_T_where_core_fmt_UpperHex_T_for_ref__T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::UpperHex", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::UpperHex"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_UpperHex_where_core_marker_Sized_T_where_core_fmt_UpperHex_T_for_ref__T.
  
  Module Impl_core_fmt_UpperHex_where_core_marker_Sized_T_where_core_fmt_UpperHex_T_for_ref_mut_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::UpperHex", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::UpperHex"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_UpperHex_where_core_marker_Sized_T_where_core_fmt_UpperHex_T_for_ref_mut_T.
  
  Module Impl_core_fmt_LowerExp_where_core_marker_Sized_T_where_core_fmt_LowerExp_T_for_ref__T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::LowerExp", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::LowerExp"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_LowerExp_where_core_marker_Sized_T_where_core_fmt_LowerExp_T_for_ref__T.
  
  Module Impl_core_fmt_LowerExp_where_core_marker_Sized_T_where_core_fmt_LowerExp_T_for_ref_mut_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::LowerExp", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::LowerExp"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_LowerExp_where_core_marker_Sized_T_where_core_fmt_LowerExp_T_for_ref_mut_T.
  
  Module Impl_core_fmt_UpperExp_where_core_marker_Sized_T_where_core_fmt_UpperExp_T_for_ref__T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::UpperExp", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::UpperExp"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_UpperExp_where_core_marker_Sized_T_where_core_fmt_UpperExp_T_for_ref__T.
  
  Module Impl_core_fmt_UpperExp_where_core_marker_Sized_T_where_core_fmt_UpperExp_T_for_ref_mut_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [] [ T ].
    
    (*             fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::UpperExp", T, [], "fmt", [] |),
            [ M.read (| M.read (| self |) |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::UpperExp"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_UpperExp_where_core_marker_Sized_T_where_core_fmt_UpperExp_T_for_ref_mut_T.
  
  Module Impl_core_fmt_Debug_for_never.
    Definition Self : Ty.t := Ty.path "never".
    
    (*
        fn fmt(&self, _: &mut Formatter<'_>) -> Result {
            *self
        }
    *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; β1 ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let β1 := M.alloc (| β1 |) in
          M.match_operator (|
            β1,
            [ fun γ => ltac:(M.monadic (M.never_to_any (| M.read (| M.read (| self |) |) |))) ]
          |)))
      | _, _, _ => 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_never.
  
  Module Impl_core_fmt_Display_for_never.
    Definition Self : Ty.t := Ty.path "never".
    
    (*
        fn fmt(&self, _: &mut Formatter<'_>) -> Result {
            *self
        }
    *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; β1 ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let β1 := M.alloc (| β1 |) in
          M.match_operator (|
            β1,
            [ fun γ => ltac:(M.monadic (M.never_to_any (| M.read (| M.read (| self |) |) |))) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_never.
  
  Module Impl_core_fmt_Debug_for_bool.
    Definition Self : Ty.t := Ty.path "bool".
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            Display::fmt(self, f)
        }
    *)
    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_trait_method (| "core::fmt::Display", Ty.path "bool", [], "fmt", [] |),
            [ M.read (| self |); M.read (| f |) ]
          |)))
      | _, _, _ => 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_bool.
  
  Module Impl_core_fmt_Display_for_bool.
    Definition Self : Ty.t := Ty.path "bool".
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            Display::fmt(if *self { "true" } else { "false" }, f)
        }
    *)
    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_trait_method (| "core::fmt::Display", Ty.path "str", [], "fmt", [] |),
            [
              M.read (|
                M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.use (M.read (| self |)) in
                        let _ :=
                          M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                        M.alloc (| M.read (| Value.String "true" |) |)));
                    fun γ => ltac:(M.monadic (M.alloc (| M.read (| Value.String "false" |) |)))
                  ]
                |)
              |);
              M.read (| f |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_bool.
  
  Module Impl_core_fmt_Debug_for_str.
    Definition Self : Ty.t := Ty.path "str".
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            f.write_char('"')?;
    
            // substring we know is printable
            let mut printable_range = 0..0;
    
            fn needs_escape(b: u8) -> bool {
                b > 0x7E || b < 0x20 || b == b'\\' || b == b'"'
            }
    
            // the loop here first skips over runs of printable ASCII as a fast path.
            // other chars (unicode, or ASCII that needs escaping) are then handled per-`char`.
            let mut rest = self;
            while rest.len() > 0 {
                let Some(non_printable_start) = rest.as_bytes().iter().position(|&b| needs_escape(b))
                else {
                    printable_range.end += rest.len();
                    break;
                };
    
                printable_range.end += non_printable_start;
                // SAFETY: the position was derived from an iterator, so is known to be within bounds, and at a char boundary
                rest = unsafe { rest.get_unchecked(non_printable_start..) };
    
                let mut chars = rest.chars();
                if let Some(c) = chars.next() {
                    let esc = c.escape_debug_ext(EscapeDebugExtArgs {
                        escape_grapheme_extended: true,
                        escape_single_quote: false,
                        escape_double_quote: true,
                    });
                    if esc.len() != 1 {
                        f.write_str(&self[printable_range.clone()])?;
                        Display::fmt(&esc, f)?;
                        printable_range.start = printable_range.end + c.len_utf8();
                    }
                    printable_range.end += c.len_utf8();
                }
                rest = chars.as_str();
            }
    
            f.write_str(&self[printable_range])?;
    
            f.write_char('"')
        }
    "
    *)
    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.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.path "core::fmt::Error" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::fmt::Write",
                              Ty.path "core::fmt::Formatter",
                              [],
                              "write_char",
                              []
                            |),
                            [ M.read (| f |); Value.UnicodeChar 34 ]
                          |)
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Break",
                              0
                            |) in
                          let residual := M.copy (| γ0_0 |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::FromResidual",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "core::fmt::Error"
                                          ]
                                      ],
                                      "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~ printable_range :=
                  M.alloc (|
                    Value.StructRecord
                      "core::ops::range::Range"
                      [
                        ("start", Value.Integer IntegerKind.Usize 0);
                        ("end_", Value.Integer IntegerKind.Usize 0)
                      ]
                  |) in
                let~ rest := M.copy (| self |) in
                let~ _ :=
                  M.loop (|
                    ltac:(M.monadic
                      (M.match_operator (|
                        M.alloc (| Value.Tuple [] |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ :=
                                M.use
                                  (M.alloc (|
                                    BinOp.gt (|
                                      M.call_closure (|
                                        M.get_associated_function (| Ty.path "str", "len", [] |),
                                        [ M.read (| rest |) ]
                                      |),
                                      Value.Integer IntegerKind.Usize 0
                                    |)
                                  |)) in
                              let _ :=
                                M.is_constant_or_break_match (|
                                  M.read (| γ |),
                                  Value.Bool true
                                |) in
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::traits::iterator::Iterator",
                                      Ty.apply
                                        (Ty.path "core::slice::iter::Iter")
                                        []
                                        [ Ty.path "u8" ],
                                      [],
                                      "position",
                                      [
                                        Ty.function
                                          [ Ty.tuple [ Ty.apply (Ty.path "&") [] [ Ty.path "u8" ] ]
                                          ]
                                          (Ty.path "bool")
                                      ]
                                    |),
                                    [
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ],
                                            "iter",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path "str",
                                                "as_bytes",
                                                []
                                              |),
                                              [ M.read (| rest |) ]
                                            |)
                                          ]
                                        |)
                                      |);
                                      M.closure
                                        (fun γ =>
                                          ltac:(M.monadic
                                            match γ with
                                            | [ α0 ] =>
                                              ltac:(M.monadic
                                                (M.match_operator (|
                                                  M.alloc (| α0 |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ := M.read (| γ |) in
                                                        let b := M.copy (| γ |) in
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Self,
                                                            "needs_escape.fmt",
                                                            []
                                                          |),
                                                          [ M.read (| b |) ]
                                                        |)))
                                                  ]
                                                |)))
                                            | _ => M.impossible "wrong number of arguments"
                                            end))
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::option::Option::Some",
                                          0
                                        |) in
                                      let non_printable_start := M.copy (| γ0_0 |) in
                                      let~ _ :=
                                        let β :=
                                          M.SubPointer.get_struct_record_field (|
                                            printable_range,
                                            "core::ops::range::Range",
                                            "end"
                                          |) in
                                        M.write (|
                                          β,
                                          BinOp.Wrap.add (|
                                            M.read (| β |),
                                            M.read (| non_printable_start |)
                                          |)
                                        |) in
                                      let~ _ :=
                                        M.write (|
                                          rest,
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "str",
                                              "get_unchecked",
                                              [
                                                Ty.apply
                                                  (Ty.path "core::ops::range::RangeFrom")
                                                  []
                                                  [ Ty.path "usize" ]
                                              ]
                                            |),
                                            [
                                              M.read (| rest |);
                                              Value.StructRecord
                                                "core::ops::range::RangeFrom"
                                                [ ("start", M.read (| non_printable_start |)) ]
                                            ]
                                          |)
                                        |) in
                                      let~ chars :=
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "str",
                                              "chars",
                                              []
                                            |),
                                            [ M.read (| rest |) ]
                                          |)
                                        |) in
                                      let~ _ :=
                                        M.match_operator (|
                                          M.alloc (| Value.Tuple [] |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ :=
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::iter::traits::iterator::Iterator",
                                                        Ty.path "core::str::iter::Chars",
                                                        [],
                                                        "next",
                                                        []
                                                      |),
                                                      [ chars ]
                                                    |)
                                                  |) in
                                                let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::option::Option::Some",
                                                    0
                                                  |) in
                                                let c := M.copy (| γ0_0 |) in
                                                let~ esc :=
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path "char",
                                                        "escape_debug_ext",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| c |);
                                                        Value.StructRecord
                                                          "core::char::methods::EscapeDebugExtArgs"
                                                          [
                                                            ("escape_grapheme_extended",
                                                              Value.Bool true);
                                                            ("escape_single_quote",
                                                              Value.Bool false);
                                                            ("escape_double_quote", Value.Bool true)
                                                          ]
                                                      ]
                                                    |)
                                                  |) in
                                                let~ _ :=
                                                  M.match_operator (|
                                                    M.alloc (| Value.Tuple [] |),
                                                    [
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (let γ :=
                                                            M.use
                                                              (M.alloc (|
                                                                BinOp.ne (|
                                                                  M.call_closure (|
                                                                    M.get_trait_method (|
                                                                      "core::iter::traits::exact_size::ExactSizeIterator",
                                                                      Ty.path
                                                                        "core::char::EscapeDebug",
                                                                      [],
                                                                      "len",
                                                                      []
                                                                    |),
                                                                    [ esc ]
                                                                  |),
                                                                  Value.Integer IntegerKind.Usize 1
                                                                |)
                                                              |)) in
                                                          let _ :=
                                                            M.is_constant_or_break_match (|
                                                              M.read (| γ |),
                                                              Value.Bool true
                                                            |) 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.path "core::fmt::Error"
                                                                      ],
                                                                    [],
                                                                    "branch",
                                                                    []
                                                                  |),
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_associated_function (|
                                                                        Ty.path
                                                                          "core::fmt::Formatter",
                                                                        "write_str",
                                                                        []
                                                                      |),
                                                                      [
                                                                        M.read (| f |);
                                                                        M.call_closure (|
                                                                          M.get_trait_method (|
                                                                            "core::ops::index::Index",
                                                                            Ty.path "str",
                                                                            [
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "core::ops::range::Range")
                                                                                []
                                                                                [ Ty.path "usize" ]
                                                                            ],
                                                                            "index",
                                                                            []
                                                                          |),
                                                                          [
                                                                            M.read (| self |);
                                                                            M.call_closure (|
                                                                              M.get_trait_method (|
                                                                                "core::clone::Clone",
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::ops::range::Range")
                                                                                  []
                                                                                  [ Ty.path "usize"
                                                                                  ],
                                                                                [],
                                                                                "clone",
                                                                                []
                                                                              |),
                                                                              [ printable_range ]
                                                                            |)
                                                                          ]
                                                                        |)
                                                                      ]
                                                                    |)
                                                                  ]
                                                                |)
                                                              |),
                                                              [
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let γ0_0 :=
                                                                      M.SubPointer.get_struct_tuple_field (|
                                                                        γ,
                                                                        "core::ops::control_flow::ControlFlow::Break",
                                                                        0
                                                                      |) in
                                                                    let residual :=
                                                                      M.copy (| γ0_0 |) in
                                                                    M.alloc (|
                                                                      M.never_to_any (|
                                                                        M.read (|
                                                                          M.return_ (|
                                                                            M.call_closure (|
                                                                              M.get_trait_method (|
                                                                                "core::ops::try_trait::FromResidual",
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.tuple [];
                                                                                    Ty.path
                                                                                      "core::fmt::Error"
                                                                                  ],
                                                                                [
                                                                                  Ty.apply
                                                                                    (Ty.path
                                                                                      "core::result::Result")
                                                                                    []
                                                                                    [
                                                                                      Ty.path
                                                                                        "core::convert::Infallible";
                                                                                      Ty.path
                                                                                        "core::fmt::Error"
                                                                                    ]
                                                                                ],
                                                                                "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.path "core::fmt::Error"
                                                                      ],
                                                                    [],
                                                                    "branch",
                                                                    []
                                                                  |),
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_trait_method (|
                                                                        "core::fmt::Display",
                                                                        Ty.path
                                                                          "core::char::EscapeDebug",
                                                                        [],
                                                                        "fmt",
                                                                        []
                                                                      |),
                                                                      [ esc; M.read (| f |) ]
                                                                    |)
                                                                  ]
                                                                |)
                                                              |),
                                                              [
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let γ0_0 :=
                                                                      M.SubPointer.get_struct_tuple_field (|
                                                                        γ,
                                                                        "core::ops::control_flow::ControlFlow::Break",
                                                                        0
                                                                      |) in
                                                                    let residual :=
                                                                      M.copy (| γ0_0 |) in
                                                                    M.alloc (|
                                                                      M.never_to_any (|
                                                                        M.read (|
                                                                          M.return_ (|
                                                                            M.call_closure (|
                                                                              M.get_trait_method (|
                                                                                "core::ops::try_trait::FromResidual",
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.tuple [];
                                                                                    Ty.path
                                                                                      "core::fmt::Error"
                                                                                  ],
                                                                                [
                                                                                  Ty.apply
                                                                                    (Ty.path
                                                                                      "core::result::Result")
                                                                                    []
                                                                                    [
                                                                                      Ty.path
                                                                                        "core::convert::Infallible";
                                                                                      Ty.path
                                                                                        "core::fmt::Error"
                                                                                    ]
                                                                                ],
                                                                                "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 (|
                                                                printable_range,
                                                                "core::ops::range::Range",
                                                                "start"
                                                              |),
                                                              BinOp.Wrap.add (|
                                                                M.read (|
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    printable_range,
                                                                    "core::ops::range::Range",
                                                                    "end"
                                                                  |)
                                                                |),
                                                                M.call_closure (|
                                                                  M.get_associated_function (|
                                                                    Ty.path "char",
                                                                    "len_utf8",
                                                                    []
                                                                  |),
                                                                  [ M.read (| c |) ]
                                                                |)
                                                              |)
                                                            |) in
                                                          M.alloc (| Value.Tuple [] |)));
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (M.alloc (| Value.Tuple [] |)))
                                                    ]
                                                  |) in
                                                let~ _ :=
                                                  let β :=
                                                    M.SubPointer.get_struct_record_field (|
                                                      printable_range,
                                                      "core::ops::range::Range",
                                                      "end"
                                                    |) in
                                                  M.write (|
                                                    β,
                                                    BinOp.Wrap.add (|
                                                      M.read (| β |),
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "char",
                                                          "len_utf8",
                                                          []
                                                        |),
                                                        [ M.read (| c |) ]
                                                      |)
                                                    |)
                                                  |) in
                                                M.alloc (| Value.Tuple [] |)));
                                            fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                          ]
                                        |) in
                                      let~ _ :=
                                        M.write (|
                                          rest,
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "core::str::iter::Chars",
                                              "as_str",
                                              []
                                            |),
                                            [ chars ]
                                          |)
                                        |) in
                                      M.alloc (| Value.Tuple [] |)))
                                ]
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    let~ _ :=
                                      M.alloc (|
                                        M.never_to_any (| M.read (| M.break (||) |) |)
                                      |) in
                                    M.alloc (| Value.Tuple [] |)
                                  |)
                                |)
                              |)))
                        ]
                      |)))
                  |) 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.path "core::fmt::Error" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "core::fmt::Formatter",
                              "write_str",
                              []
                            |),
                            [
                              M.read (| f |);
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::ops::index::Index",
                                  Ty.path "str",
                                  [
                                    Ty.apply
                                      (Ty.path "core::ops::range::Range")
                                      []
                                      [ Ty.path "usize" ]
                                  ],
                                  "index",
                                  []
                                |),
                                [ M.read (| self |); M.read (| printable_range |) ]
                              |)
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Break",
                              0
                            |) in
                          let residual := M.copy (| γ0_0 |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::FromResidual",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "core::fmt::Error"
                                          ]
                                      ],
                                      "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
                M.alloc (|
                  M.call_closure (|
                    M.get_trait_method (|
                      "core::fmt::Write",
                      Ty.path "core::fmt::Formatter",
                      [],
                      "write_char",
                      []
                    |),
                    [ M.read (| f |); Value.UnicodeChar 34 ]
                  |)
                |)
              |)))
          |)))
      | _, _, _ => 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_str.
  
  Module Impl_core_fmt_Display_for_str.
    Definition Self : Ty.t := Ty.path "str".
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            f.pad(self)
        }
    *)
    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", "pad", [] |),
            [ M.read (| f |); M.read (| self |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_str.
  
  Module Impl_core_fmt_Debug_for_char.
    Definition Self : Ty.t := Ty.path "char".
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            f.write_char('\'')?;
            let esc = self.escape_debug_ext(EscapeDebugExtArgs {
                escape_grapheme_extended: true,
                escape_single_quote: true,
                escape_double_quote: false,
            });
            Display::fmt(&esc, f)?;
            f.write_char('\'')
        }
    *)
    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.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.path "core::fmt::Error" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::fmt::Write",
                              Ty.path "core::fmt::Formatter",
                              [],
                              "write_char",
                              []
                            |),
                            [ M.read (| f |); Value.UnicodeChar 39 ]
                          |)
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Break",
                              0
                            |) in
                          let residual := M.copy (| γ0_0 |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::FromResidual",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "core::fmt::Error"
                                          ]
                                      ],
                                      "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~ esc :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (| Ty.path "char", "escape_debug_ext", [] |),
                      [
                        M.read (| M.read (| self |) |);
                        Value.StructRecord
                          "core::char::methods::EscapeDebugExtArgs"
                          [
                            ("escape_grapheme_extended", Value.Bool true);
                            ("escape_single_quote", Value.Bool true);
                            ("escape_double_quote", Value.Bool false)
                          ]
                      ]
                    |)
                  |) 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.path "core::fmt::Error" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::fmt::Display",
                              Ty.path "core::char::EscapeDebug",
                              [],
                              "fmt",
                              []
                            |),
                            [ esc; M.read (| f |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Break",
                              0
                            |) in
                          let residual := M.copy (| γ0_0 |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::FromResidual",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "core::fmt::Error"
                                          ]
                                      ],
                                      "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
                M.alloc (|
                  M.call_closure (|
                    M.get_trait_method (|
                      "core::fmt::Write",
                      Ty.path "core::fmt::Formatter",
                      [],
                      "write_char",
                      []
                    |),
                    [ M.read (| f |); Value.UnicodeChar 39 ]
                  |)
                |)
              |)))
          |)))
      | _, _, _ => 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_char.
  
  Module Impl_core_fmt_Display_for_char.
    Definition Self : Ty.t := Ty.path "char".
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            if f.width.is_none() && f.precision.is_none() {
                f.write_char( *self)
            } else {
                f.pad(self.encode_utf8(&mut [0; 4]))
            }
        }
    *)
    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 (|
              M.alloc (| Value.Tuple [] |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ :=
                      M.use
                        (M.alloc (|
                          LogicalOp.and (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "usize" ],
                                "is_none",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| f |),
                                  "core::fmt::Formatter",
                                  "width"
                                |)
                              ]
                            |),
                            ltac:(M.monadic
                              (M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "usize" ],
                                  "is_none",
                                  []
                                |),
                                [
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| f |),
                                    "core::fmt::Formatter",
                                    "precision"
                                  |)
                                ]
                              |)))
                          |)
                        |)) in
                    let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::fmt::Write",
                          Ty.path "core::fmt::Formatter",
                          [],
                          "write_char",
                          []
                        |),
                        [ M.read (| f |); M.read (| M.read (| self |) |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (| Ty.path "core::fmt::Formatter", "pad", [] |),
                        [
                          M.read (| f |);
                          M.call_closure (|
                            M.get_associated_function (| Ty.path "char", "encode_utf8", [] |),
                            [
                              M.read (| M.read (| self |) |);
                              M.alloc (|
                                repeat (|
                                  Value.Integer IntegerKind.U8 0,
                                  Value.Integer IntegerKind.Usize 4
                                |)
                              |)
                            ]
                          |)
                        ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_char.
  
  Module Impl_core_fmt_Pointer_where_core_marker_Sized_T_for_pointer_const_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "*const") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            pointer_fmt_inner(self.expose_provenance(), f)
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_function (| "core::fmt::pointer_fmt_inner", [] |),
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply (Ty.path "*const") [] [ T ],
                  "expose_provenance",
                  []
                |),
                [ M.read (| M.read (| self |) |) ]
              |);
              M.read (| f |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Pointer"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Pointer_where_core_marker_Sized_T_for_pointer_const_T.
  
  (*
  pub(crate) fn pointer_fmt_inner(ptr_addr: usize, f: &mut Formatter<'_>) -> Result {
      let old_width = f.width;
      let old_flags = f.flags;
  
      // The alternate flag is already treated by LowerHex as being special-
      // it denotes whether to prefix with 0x. We use it to work out whether
      // or not to zero extend, and then unconditionally set it to get the
      // prefix.
      if f.alternate() {
          f.flags |= 1 << (rt::Flag::SignAwareZeroPad as u32);
  
          if f.width.is_none() {
              f.width = Some((usize::BITS / 4) as usize + 2);
          }
      }
      f.flags |= 1 << (rt::Flag::Alternate as u32);
  
      let ret = LowerHex::fmt(&ptr_addr, f);
  
      f.width = old_width;
      f.flags = old_flags;
  
      ret
  }
  *)
  Definition pointer_fmt_inner (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ ptr_addr; f ] =>
      ltac:(M.monadic
        (let ptr_addr := M.alloc (| ptr_addr |) in
        let f := M.alloc (| f |) in
        M.read (|
          let~ old_width :=
            M.copy (|
              M.SubPointer.get_struct_record_field (|
                M.read (| f |),
                "core::fmt::Formatter",
                "width"
              |)
            |) in
          let~ old_flags :=
            M.copy (|
              M.SubPointer.get_struct_record_field (|
                M.read (| f |),
                "core::fmt::Formatter",
                "flags"
              |)
            |) 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 "core::fmt::Formatter",
                              "alternate",
                              []
                            |),
                            [ M.read (| f |) ]
                          |)
                        |)) in
                    let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                    let~ _ :=
                      let β :=
                        M.SubPointer.get_struct_record_field (|
                          M.read (| f |),
                          "core::fmt::Formatter",
                          "flags"
                        |) in
                      M.write (|
                        β,
                        BinOp.bit_or
                          (M.read (| β |))
                          (BinOp.Wrap.shl (|
                            Value.Integer IntegerKind.U32 1,
                            M.rust_cast (Value.Integer IntegerKind.Isize 3)
                          |))
                      |) in
                    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 "usize" ],
                                      "is_none",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| f |),
                                        "core::fmt::Formatter",
                                        "width"
                                      |)
                                    ]
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ _ :=
                              M.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| f |),
                                  "core::fmt::Formatter",
                                  "width"
                                |),
                                Value.StructTuple
                                  "core::option::Option::Some"
                                  [
                                    BinOp.Wrap.add (|
                                      M.rust_cast
                                        (BinOp.Wrap.div (|
                                          M.read (| M.get_constant (| "core::num::BITS" |) |),
                                          Value.Integer IntegerKind.U32 4
                                        |)),
                                      Value.Integer IntegerKind.Usize 2
                                    |)
                                  ]
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |)));
                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
              ]
            |) in
          let~ _ :=
            let β :=
              M.SubPointer.get_struct_record_field (|
                M.read (| f |),
                "core::fmt::Formatter",
                "flags"
              |) in
            M.write (|
              β,
              BinOp.bit_or
                (M.read (| β |))
                (BinOp.Wrap.shl (|
                  Value.Integer IntegerKind.U32 1,
                  M.rust_cast (Value.Integer IntegerKind.Isize 2)
                |))
            |) in
          let~ ret :=
            M.alloc (|
              M.call_closure (|
                M.get_trait_method (| "core::fmt::LowerHex", Ty.path "usize", [], "fmt", [] |),
                [ ptr_addr; M.read (| f |) ]
              |)
            |) in
          let~ _ :=
            M.write (|
              M.SubPointer.get_struct_record_field (|
                M.read (| f |),
                "core::fmt::Formatter",
                "width"
              |),
              M.read (| old_width |)
            |) in
          let~ _ :=
            M.write (|
              M.SubPointer.get_struct_record_field (|
                M.read (| f |),
                "core::fmt::Formatter",
                "flags"
              |),
              M.read (| old_flags |)
            |) in
          ret
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_pointer_fmt_inner : M.IsFunction "core::fmt::pointer_fmt_inner" pointer_fmt_inner.
  
  Module Impl_core_fmt_Pointer_where_core_marker_Sized_T_for_pointer_mut_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "*mut") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            Pointer::fmt(&( *self as *const T), f)
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::fmt::Pointer",
              Ty.apply (Ty.path "*const") [] [ T ],
              [],
              "fmt",
              []
            |),
            [
              M.alloc (|
                M.rust_cast
                  (* MutToConstPointer *) (M.pointer_coercion (M.read (| M.read (| self |) |)))
              |);
              M.read (| f |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Pointer"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Pointer_where_core_marker_Sized_T_for_pointer_mut_T.
  
  Module Impl_core_fmt_Pointer_where_core_marker_Sized_T_for_ref__T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            Pointer::fmt(&( *self as *const T), f)
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::fmt::Pointer",
              Ty.apply (Ty.path "*const") [] [ T ],
              [],
              "fmt",
              []
            |),
            [ M.use (M.alloc (| M.read (| M.read (| self |) |) |)); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Pointer"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Pointer_where_core_marker_Sized_T_for_ref__T.
  
  Module Impl_core_fmt_Pointer_where_core_marker_Sized_T_for_ref_mut_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            Pointer::fmt(&(&**self as *const T), f)
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::fmt::Pointer",
              Ty.apply (Ty.path "*const") [] [ T ],
              [],
              "fmt",
              []
            |),
            [ M.use (M.alloc (| M.read (| M.read (| self |) |) |)); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Pointer"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Pointer_where_core_marker_Sized_T_for_ref_mut_T.
  
  Module Impl_core_fmt_Debug_where_core_marker_Sized_T_for_pointer_const_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "*const") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            Pointer::fmt(self, f)
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::fmt::Pointer",
              Ty.apply (Ty.path "*const") [] [ T ],
              [],
              "fmt",
              []
            |),
            [ M.read (| self |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_marker_Sized_T_for_pointer_const_T.
  
  Module Impl_core_fmt_Debug_where_core_marker_Sized_T_for_pointer_mut_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "*mut") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            Pointer::fmt(self, f)
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::fmt::Pointer",
              Ty.apply (Ty.path "*mut") [] [ T ],
              [],
              "fmt",
              []
            |),
            [ M.read (| self |); M.read (| f |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_marker_Sized_T_for_pointer_mut_T.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_E_where_core_fmt_Debug_D_where_core_fmt_Debug_C_where_core_fmt_Debug_B_where_core_fmt_Debug_A_where_core_fmt_Debug_Z_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_E_D_C_B_A_Z_Y_X_W_V_U_T_.
    Definition Self (E D C B A Z Y X W V U T : Ty.t) : Ty.t :=
      Ty.tuple [ E; D; C; B; A; Z; Y; X; W; V; U; T ].
    
    (*
                    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                        let mut builder = f.debug_tuple("");
                        let ($(ref $name,)+) = *self;
                        $(
                            builder.field(&$name);
                        )+
    
                        builder.finish()
                    }
    *)
    Definition fmt
        (E D C B A Z Y X W V U T : Ty.t)
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      let Self : Ty.t := Self E D C B A Z Y X W V U T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |),
                  [ M.read (| f |); M.read (| Value.String "" |) ]
                |)
              |) in
            M.match_operator (|
              M.read (| self |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                    let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                    let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in
                    let γ0_3 := M.SubPointer.get_tuple_field (| γ, 3 |) in
                    let γ0_4 := M.SubPointer.get_tuple_field (| γ, 4 |) in
                    let γ0_5 := M.SubPointer.get_tuple_field (| γ, 5 |) in
                    let γ0_6 := M.SubPointer.get_tuple_field (| γ, 6 |) in
                    let γ0_7 := M.SubPointer.get_tuple_field (| γ, 7 |) in
                    let γ0_8 := M.SubPointer.get_tuple_field (| γ, 8 |) in
                    let γ0_9 := M.SubPointer.get_tuple_field (| γ, 9 |) in
                    let γ0_10 := M.SubPointer.get_tuple_field (| γ, 10 |) in
                    let γ0_11 := M.SubPointer.get_tuple_field (| γ, 11 |) in
                    let value_E := M.alloc (| γ0_0 |) in
                    let value_D := M.alloc (| γ0_1 |) in
                    let value_C := M.alloc (| γ0_2 |) in
                    let value_B := M.alloc (| γ0_3 |) in
                    let value_A := M.alloc (| γ0_4 |) in
                    let value_Z := M.alloc (| γ0_5 |) in
                    let value_Y := M.alloc (| γ0_6 |) in
                    let value_X := M.alloc (| γ0_7 |) in
                    let value_W := M.alloc (| γ0_8 |) in
                    let value_V := M.alloc (| γ0_9 |) in
                    let value_U := M.alloc (| γ0_10 |) in
                    let value_T := M.alloc (| γ0_11 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_E ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_D ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_C ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_B ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_A ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Z ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Y ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_X ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_W ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_V ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_U ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_T ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugTuple",
                          "finish",
                          []
                        |),
                        [ builder ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (E D C B A Z Y X W V U T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self E D C B A Z Y X W V U T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt E D C B A Z Y X W V U T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_E_where_core_fmt_Debug_D_where_core_fmt_Debug_C_where_core_fmt_Debug_B_where_core_fmt_Debug_A_where_core_fmt_Debug_Z_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_E_D_C_B_A_Z_Y_X_W_V_U_T_.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_D_where_core_fmt_Debug_C_where_core_fmt_Debug_B_where_core_fmt_Debug_A_where_core_fmt_Debug_Z_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_D_C_B_A_Z_Y_X_W_V_U_T_.
    Definition Self (D C B A Z Y X W V U T : Ty.t) : Ty.t :=
      Ty.tuple [ D; C; B; A; Z; Y; X; W; V; U; T ].
    
    (*
                    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                        let mut builder = f.debug_tuple("");
                        let ($(ref $name,)+) = *self;
                        $(
                            builder.field(&$name);
                        )+
    
                        builder.finish()
                    }
    *)
    Definition fmt
        (D C B A Z Y X W V U T : Ty.t)
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      let Self : Ty.t := Self D C B A Z Y X W V U T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |),
                  [ M.read (| f |); M.read (| Value.String "" |) ]
                |)
              |) in
            M.match_operator (|
              M.read (| self |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                    let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                    let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in
                    let γ0_3 := M.SubPointer.get_tuple_field (| γ, 3 |) in
                    let γ0_4 := M.SubPointer.get_tuple_field (| γ, 4 |) in
                    let γ0_5 := M.SubPointer.get_tuple_field (| γ, 5 |) in
                    let γ0_6 := M.SubPointer.get_tuple_field (| γ, 6 |) in
                    let γ0_7 := M.SubPointer.get_tuple_field (| γ, 7 |) in
                    let γ0_8 := M.SubPointer.get_tuple_field (| γ, 8 |) in
                    let γ0_9 := M.SubPointer.get_tuple_field (| γ, 9 |) in
                    let γ0_10 := M.SubPointer.get_tuple_field (| γ, 10 |) in
                    let value_D := M.alloc (| γ0_0 |) in
                    let value_C := M.alloc (| γ0_1 |) in
                    let value_B := M.alloc (| γ0_2 |) in
                    let value_A := M.alloc (| γ0_3 |) in
                    let value_Z := M.alloc (| γ0_4 |) in
                    let value_Y := M.alloc (| γ0_5 |) in
                    let value_X := M.alloc (| γ0_6 |) in
                    let value_W := M.alloc (| γ0_7 |) in
                    let value_V := M.alloc (| γ0_8 |) in
                    let value_U := M.alloc (| γ0_9 |) in
                    let value_T := M.alloc (| γ0_10 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_D ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_C ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_B ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_A ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Z ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Y ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_X ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_W ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_V ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_U ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_T ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugTuple",
                          "finish",
                          []
                        |),
                        [ builder ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (D C B A Z Y X W V U T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self D C B A Z Y X W V U T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt D C B A Z Y X W V U T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_D_where_core_fmt_Debug_C_where_core_fmt_Debug_B_where_core_fmt_Debug_A_where_core_fmt_Debug_Z_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_D_C_B_A_Z_Y_X_W_V_U_T_.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_C_where_core_fmt_Debug_B_where_core_fmt_Debug_A_where_core_fmt_Debug_Z_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_C_B_A_Z_Y_X_W_V_U_T_.
    Definition Self (C B A Z Y X W V U T : Ty.t) : Ty.t :=
      Ty.tuple [ C; B; A; Z; Y; X; W; V; U; T ].
    
    (*
                    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                        let mut builder = f.debug_tuple("");
                        let ($(ref $name,)+) = *self;
                        $(
                            builder.field(&$name);
                        )+
    
                        builder.finish()
                    }
    *)
    Definition fmt
        (C B A Z Y X W V U T : Ty.t)
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      let Self : Ty.t := Self C B A Z Y X W V U T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |),
                  [ M.read (| f |); M.read (| Value.String "" |) ]
                |)
              |) in
            M.match_operator (|
              M.read (| self |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                    let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                    let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in
                    let γ0_3 := M.SubPointer.get_tuple_field (| γ, 3 |) in
                    let γ0_4 := M.SubPointer.get_tuple_field (| γ, 4 |) in
                    let γ0_5 := M.SubPointer.get_tuple_field (| γ, 5 |) in
                    let γ0_6 := M.SubPointer.get_tuple_field (| γ, 6 |) in
                    let γ0_7 := M.SubPointer.get_tuple_field (| γ, 7 |) in
                    let γ0_8 := M.SubPointer.get_tuple_field (| γ, 8 |) in
                    let γ0_9 := M.SubPointer.get_tuple_field (| γ, 9 |) in
                    let value_C := M.alloc (| γ0_0 |) in
                    let value_B := M.alloc (| γ0_1 |) in
                    let value_A := M.alloc (| γ0_2 |) in
                    let value_Z := M.alloc (| γ0_3 |) in
                    let value_Y := M.alloc (| γ0_4 |) in
                    let value_X := M.alloc (| γ0_5 |) in
                    let value_W := M.alloc (| γ0_6 |) in
                    let value_V := M.alloc (| γ0_7 |) in
                    let value_U := M.alloc (| γ0_8 |) in
                    let value_T := M.alloc (| γ0_9 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_C ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_B ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_A ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Z ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Y ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_X ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_W ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_V ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_U ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_T ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugTuple",
                          "finish",
                          []
                        |),
                        [ builder ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (C B A Z Y X W V U T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self C B A Z Y X W V U T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt C B A Z Y X W V U T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_C_where_core_fmt_Debug_B_where_core_fmt_Debug_A_where_core_fmt_Debug_Z_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_C_B_A_Z_Y_X_W_V_U_T_.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_B_where_core_fmt_Debug_A_where_core_fmt_Debug_Z_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_B_A_Z_Y_X_W_V_U_T_.
    Definition Self (B A Z Y X W V U T : Ty.t) : Ty.t := Ty.tuple [ B; A; Z; Y; X; W; V; U; T ].
    
    (*
                    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                        let mut builder = f.debug_tuple("");
                        let ($(ref $name,)+) = *self;
                        $(
                            builder.field(&$name);
                        )+
    
                        builder.finish()
                    }
    *)
    Definition fmt
        (B A Z Y X W V U T : Ty.t)
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      let Self : Ty.t := Self B A Z Y X W V U T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |),
                  [ M.read (| f |); M.read (| Value.String "" |) ]
                |)
              |) in
            M.match_operator (|
              M.read (| self |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                    let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                    let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in
                    let γ0_3 := M.SubPointer.get_tuple_field (| γ, 3 |) in
                    let γ0_4 := M.SubPointer.get_tuple_field (| γ, 4 |) in
                    let γ0_5 := M.SubPointer.get_tuple_field (| γ, 5 |) in
                    let γ0_6 := M.SubPointer.get_tuple_field (| γ, 6 |) in
                    let γ0_7 := M.SubPointer.get_tuple_field (| γ, 7 |) in
                    let γ0_8 := M.SubPointer.get_tuple_field (| γ, 8 |) in
                    let value_B := M.alloc (| γ0_0 |) in
                    let value_A := M.alloc (| γ0_1 |) in
                    let value_Z := M.alloc (| γ0_2 |) in
                    let value_Y := M.alloc (| γ0_3 |) in
                    let value_X := M.alloc (| γ0_4 |) in
                    let value_W := M.alloc (| γ0_5 |) in
                    let value_V := M.alloc (| γ0_6 |) in
                    let value_U := M.alloc (| γ0_7 |) in
                    let value_T := M.alloc (| γ0_8 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_B ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_A ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Z ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Y ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_X ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_W ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_V ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_U ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_T ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugTuple",
                          "finish",
                          []
                        |),
                        [ builder ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (B A Z Y X W V U T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self B A Z Y X W V U T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt B A Z Y X W V U T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_B_where_core_fmt_Debug_A_where_core_fmt_Debug_Z_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_B_A_Z_Y_X_W_V_U_T_.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_A_where_core_fmt_Debug_Z_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_A_Z_Y_X_W_V_U_T_.
    Definition Self (A Z Y X W V U T : Ty.t) : Ty.t := Ty.tuple [ A; Z; Y; X; W; V; U; T ].
    
    (*
                    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                        let mut builder = f.debug_tuple("");
                        let ($(ref $name,)+) = *self;
                        $(
                            builder.field(&$name);
                        )+
    
                        builder.finish()
                    }
    *)
    Definition fmt
        (A Z Y X W V U T : Ty.t)
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      let Self : Ty.t := Self A Z Y X W V U T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |),
                  [ M.read (| f |); M.read (| Value.String "" |) ]
                |)
              |) in
            M.match_operator (|
              M.read (| self |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                    let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                    let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in
                    let γ0_3 := M.SubPointer.get_tuple_field (| γ, 3 |) in
                    let γ0_4 := M.SubPointer.get_tuple_field (| γ, 4 |) in
                    let γ0_5 := M.SubPointer.get_tuple_field (| γ, 5 |) in
                    let γ0_6 := M.SubPointer.get_tuple_field (| γ, 6 |) in
                    let γ0_7 := M.SubPointer.get_tuple_field (| γ, 7 |) in
                    let value_A := M.alloc (| γ0_0 |) in
                    let value_Z := M.alloc (| γ0_1 |) in
                    let value_Y := M.alloc (| γ0_2 |) in
                    let value_X := M.alloc (| γ0_3 |) in
                    let value_W := M.alloc (| γ0_4 |) in
                    let value_V := M.alloc (| γ0_5 |) in
                    let value_U := M.alloc (| γ0_6 |) in
                    let value_T := M.alloc (| γ0_7 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_A ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Z ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Y ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_X ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_W ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_V ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_U ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_T ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugTuple",
                          "finish",
                          []
                        |),
                        [ builder ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (A Z Y X W V U T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self A Z Y X W V U T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt A Z Y X W V U T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_A_where_core_fmt_Debug_Z_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_A_Z_Y_X_W_V_U_T_.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_Z_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_Z_Y_X_W_V_U_T_.
    Definition Self (Z Y X W V U T : Ty.t) : Ty.t := Ty.tuple [ Z; Y; X; W; V; U; T ].
    
    (*
                    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                        let mut builder = f.debug_tuple("");
                        let ($(ref $name,)+) = *self;
                        $(
                            builder.field(&$name);
                        )+
    
                        builder.finish()
                    }
    *)
    Definition fmt
        (Z Y X W V U T : Ty.t)
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      let Self : Ty.t := Self Z Y X W V U T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |),
                  [ M.read (| f |); M.read (| Value.String "" |) ]
                |)
              |) in
            M.match_operator (|
              M.read (| self |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                    let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                    let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in
                    let γ0_3 := M.SubPointer.get_tuple_field (| γ, 3 |) in
                    let γ0_4 := M.SubPointer.get_tuple_field (| γ, 4 |) in
                    let γ0_5 := M.SubPointer.get_tuple_field (| γ, 5 |) in
                    let γ0_6 := M.SubPointer.get_tuple_field (| γ, 6 |) in
                    let value_Z := M.alloc (| γ0_0 |) in
                    let value_Y := M.alloc (| γ0_1 |) in
                    let value_X := M.alloc (| γ0_2 |) in
                    let value_W := M.alloc (| γ0_3 |) in
                    let value_V := M.alloc (| γ0_4 |) in
                    let value_U := M.alloc (| γ0_5 |) in
                    let value_T := M.alloc (| γ0_6 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Z ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Y ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_X ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_W ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_V ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_U ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_T ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugTuple",
                          "finish",
                          []
                        |),
                        [ builder ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (Z Y X W V U T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self Z Y X W V U T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt Z Y X W V U T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_Z_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_Z_Y_X_W_V_U_T_.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_Y_X_W_V_U_T_.
    Definition Self (Y X W V U T : Ty.t) : Ty.t := Ty.tuple [ Y; X; W; V; U; T ].
    
    (*
                    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                        let mut builder = f.debug_tuple("");
                        let ($(ref $name,)+) = *self;
                        $(
                            builder.field(&$name);
                        )+
    
                        builder.finish()
                    }
    *)
    Definition fmt (Y X W V U T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self Y X W V U T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |),
                  [ M.read (| f |); M.read (| Value.String "" |) ]
                |)
              |) in
            M.match_operator (|
              M.read (| self |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                    let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                    let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in
                    let γ0_3 := M.SubPointer.get_tuple_field (| γ, 3 |) in
                    let γ0_4 := M.SubPointer.get_tuple_field (| γ, 4 |) in
                    let γ0_5 := M.SubPointer.get_tuple_field (| γ, 5 |) in
                    let value_Y := M.alloc (| γ0_0 |) in
                    let value_X := M.alloc (| γ0_1 |) in
                    let value_W := M.alloc (| γ0_2 |) in
                    let value_V := M.alloc (| γ0_3 |) in
                    let value_U := M.alloc (| γ0_4 |) in
                    let value_T := M.alloc (| γ0_5 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_Y ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_X ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_W ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_V ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_U ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_T ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugTuple",
                          "finish",
                          []
                        |),
                        [ builder ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (Y X W V U T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self Y X W V U T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt Y X W V U T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_Y_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_Y_X_W_V_U_T_.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_X_W_V_U_T_.
    Definition Self (X W V U T : Ty.t) : Ty.t := Ty.tuple [ X; W; V; U; T ].
    
    (*
                    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                        let mut builder = f.debug_tuple("");
                        let ($(ref $name,)+) = *self;
                        $(
                            builder.field(&$name);
                        )+
    
                        builder.finish()
                    }
    *)
    Definition fmt (X W V U T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self X W V U T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |),
                  [ M.read (| f |); M.read (| Value.String "" |) ]
                |)
              |) in
            M.match_operator (|
              M.read (| self |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                    let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                    let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in
                    let γ0_3 := M.SubPointer.get_tuple_field (| γ, 3 |) in
                    let γ0_4 := M.SubPointer.get_tuple_field (| γ, 4 |) in
                    let value_X := M.alloc (| γ0_0 |) in
                    let value_W := M.alloc (| γ0_1 |) in
                    let value_V := M.alloc (| γ0_2 |) in
                    let value_U := M.alloc (| γ0_3 |) in
                    let value_T := M.alloc (| γ0_4 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_X ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_W ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_V ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_U ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_T ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugTuple",
                          "finish",
                          []
                        |),
                        [ builder ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (X W V U T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self X W V U T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt X W V U T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_X_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_X_W_V_U_T_.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_W_V_U_T_.
    Definition Self (W V U T : Ty.t) : Ty.t := Ty.tuple [ W; V; U; T ].
    
    (*
                    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                        let mut builder = f.debug_tuple("");
                        let ($(ref $name,)+) = *self;
                        $(
                            builder.field(&$name);
                        )+
    
                        builder.finish()
                    }
    *)
    Definition fmt (W V U T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self W V U T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |),
                  [ M.read (| f |); M.read (| Value.String "" |) ]
                |)
              |) in
            M.match_operator (|
              M.read (| self |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                    let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                    let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in
                    let γ0_3 := M.SubPointer.get_tuple_field (| γ, 3 |) in
                    let value_W := M.alloc (| γ0_0 |) in
                    let value_V := M.alloc (| γ0_1 |) in
                    let value_U := M.alloc (| γ0_2 |) in
                    let value_T := M.alloc (| γ0_3 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_W ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_V ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_U ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_T ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugTuple",
                          "finish",
                          []
                        |),
                        [ builder ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (W V U T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self W V U T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt W V U T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_W_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_W_V_U_T_.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_V_U_T_.
    Definition Self (V U T : Ty.t) : Ty.t := Ty.tuple [ V; U; T ].
    
    (*
                    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                        let mut builder = f.debug_tuple("");
                        let ($(ref $name,)+) = *self;
                        $(
                            builder.field(&$name);
                        )+
    
                        builder.finish()
                    }
    *)
    Definition fmt (V U T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self V U T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |),
                  [ M.read (| f |); M.read (| Value.String "" |) ]
                |)
              |) in
            M.match_operator (|
              M.read (| self |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                    let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                    let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in
                    let value_V := M.alloc (| γ0_0 |) in
                    let value_U := M.alloc (| γ0_1 |) in
                    let value_T := M.alloc (| γ0_2 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_V ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_U ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_T ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugTuple",
                          "finish",
                          []
                        |),
                        [ builder ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (V U T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self V U T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt V U T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_V_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_V_U_T_.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_U_T_.
    Definition Self (U T : Ty.t) : Ty.t := Ty.tuple [ U; T ].
    
    (*
                    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                        let mut builder = f.debug_tuple("");
                        let ($(ref $name,)+) = *self;
                        $(
                            builder.field(&$name);
                        )+
    
                        builder.finish()
                    }
    *)
    Definition fmt (U T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self U T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |),
                  [ M.read (| f |); M.read (| Value.String "" |) ]
                |)
              |) in
            M.match_operator (|
              M.read (| self |),
              [
                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 value_U := M.alloc (| γ0_0 |) in
                    let value_T := M.alloc (| γ0_1 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_U ]
                        |)
                      |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_T ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugTuple",
                          "finish",
                          []
                        |),
                        [ builder ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (U T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self U T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt U T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_U_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_U_T_.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_T_.
    Definition Self (T : Ty.t) : Ty.t := Ty.tuple [ T ].
    
    (*
                    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                        let mut builder = f.debug_tuple("");
                        let ($(ref $name,)+) = *self;
                        $(
                            builder.field(&$name);
                        )+
    
                        builder.finish()
                    }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ builder :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |),
                  [ M.read (| f |); M.read (| Value.String "" |) ]
                |)
              |) in
            M.match_operator (|
              M.read (| self |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                    let value_T := M.alloc (| γ0_0 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugTuple",
                            "field",
                            []
                          |),
                          [ builder; value_T ]
                        |)
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugTuple",
                          "finish",
                          []
                        |),
                        [ builder ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_T_where_core_marker_Sized_T_for_Tuple_T_.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_slice_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "slice") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            f.debug_list().entries(self.iter()).finish()
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      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::builders::DebugList", "finish", [] |),
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugList",
                  "entries",
                  [
                    Ty.apply (Ty.path "&") [] [ T ];
                    Ty.apply (Ty.path "core::slice::iter::Iter") [] [ T ]
                  ]
                |),
                [
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "core::fmt::Formatter",
                        "debug_list",
                        []
                      |),
                      [ M.read (| f |) ]
                    |)
                  |);
                  M.call_closure (|
                    M.get_associated_function (| Ty.apply (Ty.path "slice") [] [ T ], "iter", [] |),
                    [ M.read (| self |) ]
                  |)
                ]
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_slice_T.
  
  Module Impl_core_fmt_Debug_for_Tuple_.
    Definition Self : Ty.t := Ty.tuple [].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            f.pad("()")
        }
    *)
    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", "pad", [] |),
            [ M.read (| f |); M.read (| Value.String "()" |) ]
          |)))
      | _, _, _ => 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_Tuple_.
  
  Module Impl_core_fmt_Debug_where_core_marker_Sized_T_for_core_marker_PhantomData_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::marker::PhantomData") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            write!(f, "PhantomData<{}>", crate::any::type_name::<T>())
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      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", "write_fmt", [] |),
            [
              M.read (| f |);
              M.call_closure (|
                M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |),
                [
                  M.alloc (|
                    Value.Array
                      [ M.read (| Value.String "PhantomData<" |); M.read (| Value.String ">" |) ]
                  |);
                  M.alloc (|
                    Value.Array
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::rt::Argument",
                            "new_display",
                            [ Ty.apply (Ty.path "&") [] [ Ty.path "str" ] ]
                          |),
                          [
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "core::any::type_name", [ T ] |),
                                []
                              |)
                            |)
                          ]
                        |)
                      ]
                  |)
                ]
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_marker_Sized_T_for_core_marker_PhantomData_T.
  
  Module Impl_core_fmt_Debug_where_core_marker_Copy_T_where_core_fmt_Debug_T_for_core_cell_Cell_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::cell::Cell") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            f.debug_struct("Cell").field("value", &self.get()).finish()
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      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::builders::DebugStruct",
              "finish",
              []
            |),
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugStruct",
                  "field",
                  []
                |),
                [
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "core::fmt::Formatter",
                        "debug_struct",
                        []
                      |),
                      [ M.read (| f |); M.read (| Value.String "Cell" |) ]
                    |)
                  |);
                  M.read (| Value.String "value" |);
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply (Ty.path "core::cell::Cell") [] [ T ],
                        "get",
                        []
                      |),
                      [ M.read (| self |) ]
                    |)
                  |)
                ]
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_marker_Copy_T_where_core_fmt_Debug_T_for_core_cell_Cell_T.
  
  Module Impl_core_fmt_Debug_where_core_marker_Sized_T_where_core_fmt_Debug_T_for_core_cell_RefCell_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::cell::RefCell") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            let mut d = f.debug_struct("RefCell");
            match self.try_borrow() {
                Ok(borrow) => d.field("value", &borrow),
                Err(_) => d.field("value", &format_args!("<borrowed>")),
            };
            d.finish()
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let~ d :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::Formatter",
                    "debug_struct",
                    []
                  |),
                  [ M.read (| f |); M.read (| Value.String "RefCell" |) ]
                |)
              |) in
            let~ _ :=
              M.match_operator (|
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply (Ty.path "core::cell::RefCell") [] [ T ],
                      "try_borrow",
                      []
                    |),
                    [ M.read (| self |) ]
                  |)
                |),
                [
                  fun γ =>
                    ltac:(M.monadic
                      (let γ0_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "core::result::Result::Ok",
                          0
                        |) in
                      let borrow := M.copy (| γ0_0 |) in
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugStruct",
                            "field",
                            []
                          |),
                          [ d; M.read (| Value.String "value" |); borrow ]
                        |)
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ0_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "core::result::Result::Err",
                          0
                        |) in
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::fmt::builders::DebugStruct",
                            "field",
                            []
                          |),
                          [
                            d;
                            M.read (| Value.String "value" |);
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.path "core::fmt::Arguments",
                                  "new_const",
                                  []
                                |),
                                [
                                  M.alloc (|
                                    Value.Array [ M.read (| Value.String "<borrowed>" |) ]
                                  |)
                                ]
                              |)
                            |)
                          ]
                        |)
                      |)))
                ]
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::builders::DebugStruct",
                  "finish",
                  []
                |),
                [ d ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_marker_Sized_T_where_core_fmt_Debug_T_for_core_cell_RefCell_T.
  
  Module Impl_core_fmt_Debug_where_core_marker_Sized_T_where_core_fmt_Debug_T_for_core_cell_Ref_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::cell::Ref") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            Debug::fmt(&**self, f)
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Debug", T, [], "fmt", [] |),
            [
              M.call_closure (|
                M.get_trait_method (|
                  "core::ops::deref::Deref",
                  Ty.apply (Ty.path "core::cell::Ref") [] [ T ],
                  [],
                  "deref",
                  []
                |),
                [ M.read (| self |) ]
              |);
              M.read (| f |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_marker_Sized_T_where_core_fmt_Debug_T_for_core_cell_Ref_T.
  
  Module Impl_core_fmt_Debug_where_core_marker_Sized_T_where_core_fmt_Debug_T_for_core_cell_RefMut_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::cell::RefMut") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            Debug::fmt(&*(self.deref()), f)
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Debug", T, [], "fmt", [] |),
            [
              M.call_closure (|
                M.get_trait_method (|
                  "core::ops::deref::Deref",
                  Ty.apply (Ty.path "core::cell::RefMut") [] [ T ],
                  [],
                  "deref",
                  []
                |),
                [ M.read (| self |) ]
              |);
              M.read (| f |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_marker_Sized_T_where_core_fmt_Debug_T_for_core_cell_RefMut_T.
  
  Module Impl_core_fmt_Debug_where_core_marker_Sized_T_for_core_cell_UnsafeCell_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::cell::UnsafeCell") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            f.debug_struct("UnsafeCell").finish_non_exhaustive()
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      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::builders::DebugStruct",
              "finish_non_exhaustive",
              []
            |),
            [
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::Formatter",
                    "debug_struct",
                    []
                  |),
                  [ M.read (| f |); M.read (| Value.String "UnsafeCell" |) ]
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_marker_Sized_T_for_core_cell_UnsafeCell_T.
  
  Module Impl_core_fmt_Debug_where_core_marker_Sized_T_for_core_cell_SyncUnsafeCell_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::cell::SyncUnsafeCell") [] [ T ].
    
    (*
        fn fmt(&self, f: &mut Formatter<'_>) -> Result {
            f.debug_struct("SyncUnsafeCell").finish_non_exhaustive()
        }
    *)
    Definition fmt (T : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      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::builders::DebugStruct",
              "finish_non_exhaustive",
              []
            |),
            [
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::Formatter",
                    "debug_struct",
                    []
                  |),
                  [ M.read (| f |); M.read (| Value.String "SyncUnsafeCell" |) ]
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_marker_Sized_T_for_core_cell_SyncUnsafeCell_T.
End fmt.
