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

Module iter.
  Module adapters.
    Module map_windows.
      (* StructRecord
        {
          name := "MapWindows";
          const_params := [ "N" ];
          ty_params := [ "I"; "F" ];
          fields :=
            [
              ("f", F);
              ("inner",
                Ty.apply (Ty.path "core::iter::adapters::map_windows::MapWindowsInner") [ N ] [ I ])
            ];
        } *)
      
      (* StructRecord
        {
          name := "MapWindowsInner";
          const_params := [ "N" ];
          ty_params := [ "I" ];
          fields :=
            [
              ("iter", Ty.apply (Ty.path "core::option::Option") [] [ I ]);
              ("buffer",
                Ty.apply
                  (Ty.path "core::option::Option")
                  []
                  [
                    Ty.apply
                      (Ty.path "core::iter::adapters::map_windows::Buffer")
                      [ N ]
                      [ Ty.associated ]
                  ])
            ];
        } *)
      
      (* StructRecord
        {
          name := "Buffer";
          const_params := [ "N" ];
          ty_params := [ "T" ];
          fields :=
            [
              ("buffer",
                Ty.apply
                  (Ty.path "array")
                  [ Value.Integer IntegerKind.Usize 2 ]
                  [
                    Ty.apply
                      (Ty.path "array")
                      [ N ]
                      [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ] ]
                  ]);
              ("start", Ty.path "usize")
            ];
        } *)
      
      Module Impl_core_iter_adapters_map_windows_MapWindows_N_I_F.
        Definition Self (N : Value.t) (I F : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::map_windows::MapWindows") [ N ] [ I; F ].
        
        (*
            pub(in crate::iter) fn new(iter: I, f: F) -> Self {
                assert!(N != 0, "array in `Iterator::map_windows` must contain more than 0 elements");
        
                // Only ZST arrays' length can be so large.
                if mem::size_of::<I::Item>() == 0 {
                    assert!(
                        N.checked_mul(2).is_some(),
                        "array size of `Iterator::map_windows` is too large"
                    );
                }
        
                Self { inner: MapWindowsInner::new(iter), f }
            }
        *)
        Definition new
            (N : Value.t)
            (I F : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N I F in
          match ε, τ, α with
          | [], [], [ iter; f ] =>
            ltac:(M.monadic
              (let iter := M.alloc (| iter |) in
              let f := M.alloc (| f |) in
              M.read (|
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                UnOp.not (|
                                  BinOp.ne (|
                                    M.read (|
                                      M.get_constant (| "core::iter::adapters::map_windows::N" |)
                                    |),
                                    Value.Integer IntegerKind.Usize 0
                                  |)
                                |)
                              |)) 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_fmt", [] |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "core::fmt::Arguments",
                                      "new_const",
                                      []
                                    |),
                                    [
                                      M.alloc (|
                                        Value.Array
                                          [
                                            M.read (|
                                              Value.String
                                                "array in `Iterator::map_windows` must contain more than 0 elements"
                                            |)
                                          ]
                                      |)
                                    ]
                                  |)
                                ]
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                BinOp.eq (|
                                  M.call_closure (|
                                    M.get_function (| "core::mem::size_of", [ Ty.associated ] |),
                                    []
                                  |),
                                  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 (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          UnOp.not (|
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "core::option::Option")
                                                  []
                                                  [ Ty.path "usize" ],
                                                "is_some",
                                                []
                                              |),
                                              [
                                                M.alloc (|
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.path "usize",
                                                      "checked_mul",
                                                      []
                                                    |),
                                                    [
                                                      M.read (|
                                                        M.get_constant (|
                                                          "core::iter::adapters::map_windows::N"
                                                        |)
                                                      |);
                                                      Value.Integer IntegerKind.Usize 2
                                                    ]
                                                  |)
                                                |)
                                              ]
                                            |)
                                          |)
                                        |)) 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_fmt", [] |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path "core::fmt::Arguments",
                                                "new_const",
                                                []
                                              |),
                                              [
                                                M.alloc (|
                                                  Value.Array
                                                    [
                                                      M.read (|
                                                        Value.String
                                                          "array size of `Iterator::map_windows` is too large"
                                                      |)
                                                    ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |)
                                    |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          M.alloc (| Value.Tuple [] |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                M.alloc (|
                  Value.StructRecord
                    "core::iter::adapters::map_windows::MapWindows"
                    [
                      ("inner",
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::iter::adapters::map_windows::MapWindowsInner")
                              [ N ]
                              [ I ],
                            "new",
                            []
                          |),
                          [ M.read (| iter |) ]
                        |));
                      ("f", M.read (| f |))
                    ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_new :
          forall (N : Value.t) (I F : Ty.t),
          M.IsAssociatedFunction (Self N I F) "new" (new N I F).
      End Impl_core_iter_adapters_map_windows_MapWindows_N_I_F.
      
      Module Impl_core_iter_adapters_map_windows_MapWindowsInner_N_I.
        Definition Self (N : Value.t) (I : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::map_windows::MapWindowsInner") [ N ] [ I ].
        
        (*
            fn new(iter: I) -> Self {
                Self { iter: Some(iter), buffer: None }
            }
        *)
        Definition new
            (N : Value.t)
            (I : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N I in
          match ε, τ, α with
          | [], [], [ iter ] =>
            ltac:(M.monadic
              (let iter := M.alloc (| iter |) in
              Value.StructRecord
                "core::iter::adapters::map_windows::MapWindowsInner"
                [
                  ("iter", Value.StructTuple "core::option::Option::Some" [ M.read (| iter |) ]);
                  ("buffer", Value.StructTuple "core::option::Option::None" [])
                ]))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_new :
          forall (N : Value.t) (I : Ty.t),
          M.IsAssociatedFunction (Self N I) "new" (new N I).
        
        (*
            fn next_window(&mut self) -> Option<&[I::Item; N]> {
                let iter = self.iter.as_mut()?;
                match self.buffer {
                    // It is the first time to advance. We collect
                    // the first `N` items from `self.iter` to initialize `self.buffer`.
                    None => self.buffer = Buffer::try_from_iter(iter),
                    Some(ref mut buffer) => match iter.next() {
                        None => {
                            // Fuse the inner iterator since it yields a `None`.
                            self.iter.take();
                            self.buffer.take();
                        }
                        // Advance the iterator. We first call `next` before changing our buffer
                        // at all. This means that if `next` panics, our invariant is upheld and
                        // our `Drop` impl drops the correct elements.
                        Some(item) => buffer.push(item),
                    },
                }
                self.buffer.as_ref().map(Buffer::as_array_ref)
            }
        *)
        Definition next_window
            (N : Value.t)
            (I : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N I in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.catch_return (|
                ltac:(M.monadic
                  (M.read (|
                    let~ iter :=
                      M.copy (|
                        M.match_operator (|
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::try_trait::Try",
                                Ty.apply
                                  (Ty.path "core::option::Option")
                                  []
                                  [ Ty.apply (Ty.path "&mut") [] [ I ] ],
                                [],
                                "branch",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply (Ty.path "core::option::Option") [] [ I ],
                                    "as_mut",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "core::iter::adapters::map_windows::MapWindowsInner",
                                      "iter"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          |),
                          [
                            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::option::Option")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "&")
                                                  []
                                                  [
                                                    Ty.apply
                                                      (Ty.path "array")
                                                      [ N ]
                                                      [ Ty.associated ]
                                                  ]
                                              ],
                                            [
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                []
                                                [ Ty.path "core::convert::Infallible" ]
                                            ],
                                            "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.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::map_windows::MapWindowsInner",
                          "buffer"
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                              M.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "core::iter::adapters::map_windows::MapWindowsInner",
                                  "buffer"
                                |),
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::iter::adapters::map_windows::Buffer")
                                      [ N ]
                                      [ Ty.associated ],
                                    "try_from_iter",
                                    [ I ]
                                  |),
                                  [ M.read (| iter |) ]
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::option::Option::Some",
                                  0
                                |) in
                              let buffer := M.alloc (| γ0_0 |) in
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::traits::iterator::Iterator",
                                      I,
                                      [],
                                      "next",
                                      []
                                    |),
                                    [ M.read (| iter |) ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let _ :=
                                        M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                                      let~ _ :=
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply (Ty.path "core::option::Option") [] [ I ],
                                              "take",
                                              []
                                            |),
                                            [
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| self |),
                                                "core::iter::adapters::map_windows::MapWindowsInner",
                                                "iter"
                                              |)
                                            ]
                                          |)
                                        |) in
                                      let~ _ :=
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                []
                                                [
                                                  Ty.apply
                                                    (Ty.path
                                                      "core::iter::adapters::map_windows::Buffer")
                                                    [ N ]
                                                    [ Ty.associated ]
                                                ],
                                              "take",
                                              []
                                            |),
                                            [
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| self |),
                                                "core::iter::adapters::map_windows::MapWindowsInner",
                                                "buffer"
                                              |)
                                            ]
                                          |)
                                        |) 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 item := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "core::iter::adapters::map_windows::Buffer")
                                              [ N ]
                                              [ Ty.associated ],
                                            "push",
                                            []
                                          |),
                                          [ M.read (| buffer |); M.read (| item |) ]
                                        |)
                                      |)))
                                ]
                              |)))
                        ]
                      |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "core::option::Option")
                            []
                            [
                              Ty.apply
                                (Ty.path "&")
                                []
                                [
                                  Ty.apply
                                    (Ty.path "core::iter::adapters::map_windows::Buffer")
                                    [ N ]
                                    [ Ty.associated ]
                                ]
                            ],
                          "map",
                          [
                            Ty.apply
                              (Ty.path "&")
                              []
                              [ Ty.apply (Ty.path "array") [ N ] [ Ty.associated ] ];
                            Ty.function
                              [
                                Ty.apply
                                  (Ty.path "&")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "core::iter::adapters::map_windows::Buffer")
                                      [ N ]
                                      [ Ty.associated ]
                                  ]
                              ]
                              (Ty.apply
                                (Ty.path "&")
                                []
                                [ Ty.apply (Ty.path "array") [ N ] [ Ty.associated ] ])
                          ]
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "core::option::Option")
                                []
                                [
                                  Ty.apply
                                    (Ty.path "core::iter::adapters::map_windows::Buffer")
                                    [ N ]
                                    [ Ty.associated ]
                                ],
                              "as_ref",
                              []
                            |),
                            [
                              M.SubPointer.get_struct_record_field (|
                                M.read (| self |),
                                "core::iter::adapters::map_windows::MapWindowsInner",
                                "buffer"
                              |)
                            ]
                          |);
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::iter::adapters::map_windows::Buffer")
                              [ N ]
                              [ Ty.associated ],
                            "as_array_ref",
                            []
                          |)
                        ]
                      |)
                    |)
                  |)))
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_next_window :
          forall (N : Value.t) (I : Ty.t),
          M.IsAssociatedFunction (Self N I) "next_window" (next_window N I).
        
        (*
            fn size_hint(&self) -> (usize, Option<usize>) {
                let Some(ref iter) = self.iter else { return (0, Some(0)) };
                let (lo, hi) = iter.size_hint();
                if self.buffer.is_some() {
                    // If the first `N` items are already yielded by the inner iterator,
                    // the size hint is then equal to the that of the inner iterator's.
                    (lo, hi)
                } else {
                    // If the first `N` items are not yet yielded by the inner iterator,
                    // the first `N` elements should be counted as one window, so both bounds
                    // should subtract `N - 1`.
                    (lo.saturating_sub(N - 1), hi.map(|hi| hi.saturating_sub(N - 1)))
                }
            }
        *)
        Definition size_hint
            (N : Value.t)
            (I : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N I in
          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::iter::adapters::map_windows::MapWindowsInner",
                    "iter"
                  |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::option::Option::Some",
                            0
                          |) in
                        let iter := M.alloc (| γ0_0 |) in
                        M.match_operator (|
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::iter::traits::iterator::Iterator",
                                I,
                                [],
                                "size_hint",
                                []
                              |),
                              [ M.read (| iter |) ]
                            |)
                          |),
                          [
                            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 lo := M.copy (| γ0_0 |) in
                                let hi := M.copy (| γ0_1 |) 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.apply
                                                        (Ty.path
                                                          "core::iter::adapters::map_windows::Buffer")
                                                        [ N ]
                                                        [ Ty.associated ]
                                                    ],
                                                  "is_some",
                                                  []
                                                |),
                                                [
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| self |),
                                                    "core::iter::adapters::map_windows::MapWindowsInner",
                                                    "buffer"
                                                  |)
                                                ]
                                              |)
                                            |)) in
                                        let _ :=
                                          M.is_constant_or_break_match (|
                                            M.read (| γ |),
                                            Value.Bool true
                                          |) in
                                        M.alloc (|
                                          Value.Tuple [ M.read (| lo |); M.read (| hi |) ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (M.alloc (|
                                          Value.Tuple
                                            [
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "usize",
                                                  "saturating_sub",
                                                  []
                                                |),
                                                [
                                                  M.read (| lo |);
                                                  BinOp.Wrap.sub (|
                                                    M.read (|
                                                      M.get_constant (|
                                                        "core::iter::adapters::map_windows::N"
                                                      |)
                                                    |),
                                                    Value.Integer IntegerKind.Usize 1
                                                  |)
                                                ]
                                              |);
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "core::option::Option")
                                                    []
                                                    [ Ty.path "usize" ],
                                                  "map",
                                                  [
                                                    Ty.path "usize";
                                                    Ty.function
                                                      [ Ty.tuple [ Ty.path "usize" ] ]
                                                      (Ty.path "usize")
                                                  ]
                                                |),
                                                [
                                                  M.read (| hi |);
                                                  M.closure
                                                    (fun γ =>
                                                      ltac:(M.monadic
                                                        match γ with
                                                        | [ α0 ] =>
                                                          ltac:(M.monadic
                                                            (M.match_operator (|
                                                              M.alloc (| α0 |),
                                                              [
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let hi := M.copy (| γ |) in
                                                                    M.call_closure (|
                                                                      M.get_associated_function (|
                                                                        Ty.path "usize",
                                                                        "saturating_sub",
                                                                        []
                                                                      |),
                                                                      [
                                                                        M.read (| hi |);
                                                                        BinOp.Wrap.sub (|
                                                                          M.read (|
                                                                            M.get_constant (|
                                                                              "core::iter::adapters::map_windows::N"
                                                                            |)
                                                                          |),
                                                                          Value.Integer
                                                                            IntegerKind.Usize
                                                                            1
                                                                        |)
                                                                      ]
                                                                    |)))
                                                              ]
                                                            |)))
                                                        | _ =>
                                                          M.impossible "wrong number of arguments"
                                                        end))
                                                ]
                                              |)
                                            ]
                                        |)))
                                  ]
                                |)))
                          ]
                        |)))
                  ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_size_hint :
          forall (N : Value.t) (I : Ty.t),
          M.IsAssociatedFunction (Self N I) "size_hint" (size_hint N I).
      End Impl_core_iter_adapters_map_windows_MapWindowsInner_N_I.
      
      Module Impl_core_iter_adapters_map_windows_Buffer_N_T.
        Definition Self (N : Value.t) (T : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::map_windows::Buffer") [ N ] [ T ].
        
        (*
            fn try_from_iter(iter: &mut impl Iterator<Item = T>) -> Option<Self> {
                let first_half = crate::array::iter_next_chunk(iter).ok()?;
                let buffer =
                    [MaybeUninit::new(first_half).transpose(), [const { MaybeUninit::uninit() }; N]];
                Some(Self { buffer, start: 0 })
            }
        *)
        Definition try_from_iter
            (N : Value.t)
            (T : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N T in
          match ε, τ, α with
          | [], [ impl_Iterator_Item___T_ ], [ iter ] =>
            ltac:(M.monadic
              (let iter := M.alloc (| iter |) in
              M.catch_return (|
                ltac:(M.monadic
                  (M.read (|
                    let~ first_half :=
                      M.copy (|
                        M.match_operator (|
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::try_trait::Try",
                                Ty.apply
                                  (Ty.path "core::option::Option")
                                  []
                                  [ Ty.apply (Ty.path "array") [ N ] [ T ] ],
                                [],
                                "branch",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      []
                                      [
                                        Ty.apply (Ty.path "array") [ N ] [ T ];
                                        Ty.apply (Ty.path "core::array::iter::IntoIter") [ N ] [ T ]
                                      ],
                                    "ok",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_function (|
                                        "core::array::iter_next_chunk",
                                        [ T; impl_Iterator_Item___T_ ]
                                      |),
                                      [ M.read (| iter |) ]
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          |),
                          [
                            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::option::Option")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path
                                                    "core::iter::adapters::map_windows::Buffer")
                                                  [ N ]
                                                  [ T ]
                                              ],
                                            [
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                []
                                                [ Ty.path "core::convert::Infallible" ]
                                            ],
                                            "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~ buffer :=
                      M.alloc (|
                        Value.Array
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                                  []
                                  [ Ty.apply (Ty.path "array") [ N ] [ T ] ],
                                "transpose",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                                      []
                                      [ Ty.apply (Ty.path "array") [ N ] [ T ] ],
                                    "new",
                                    []
                                  |),
                                  [ M.read (| first_half |) ]
                                |)
                              ]
                            |);
                            repeat (|
                              M.read (|
                                M.get_constant (|
                                  "core::iter::adapters::map_windows::try_from_iter_discriminant"
                                |)
                              |),
                              N
                            |)
                          ]
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::option::Option::Some"
                        [
                          Value.StructRecord
                            "core::iter::adapters::map_windows::Buffer"
                            [
                              ("buffer", M.read (| buffer |));
                              ("start", Value.Integer IntegerKind.Usize 0)
                            ]
                        ]
                    |)
                  |)))
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_try_from_iter :
          forall (N : Value.t) (T : Ty.t),
          M.IsAssociatedFunction (Self N T) "try_from_iter" (try_from_iter N T).
        
        (*
            fn buffer_ptr(&self) -> *const MaybeUninit<T> {
                self.buffer.as_ptr().cast()
            }
        *)
        Definition buffer_ptr
            (N : Value.t)
            (T : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N T in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "*const")
                    []
                    [
                      Ty.apply
                        (Ty.path "array")
                        [ N ]
                        [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ] ]
                    ],
                  "cast",
                  [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ] ]
                |),
                [
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "slice")
                        []
                        [
                          Ty.apply
                            (Ty.path "array")
                            [ N ]
                            [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ] ]
                        ],
                      "as_ptr",
                      []
                    |),
                    [
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "core::iter::adapters::map_windows::Buffer",
                        "buffer"
                      |)
                    ]
                  |)
                ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_buffer_ptr :
          forall (N : Value.t) (T : Ty.t),
          M.IsAssociatedFunction (Self N T) "buffer_ptr" (buffer_ptr N T).
        
        (*
            fn buffer_mut_ptr(&mut self) -> *mut MaybeUninit<T> {
                self.buffer.as_mut_ptr().cast()
            }
        *)
        Definition buffer_mut_ptr
            (N : Value.t)
            (T : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N T in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "*mut")
                    []
                    [
                      Ty.apply
                        (Ty.path "array")
                        [ N ]
                        [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ] ]
                    ],
                  "cast",
                  [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ] ]
                |),
                [
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "slice")
                        []
                        [
                          Ty.apply
                            (Ty.path "array")
                            [ N ]
                            [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ] ]
                        ],
                      "as_mut_ptr",
                      []
                    |),
                    [
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "core::iter::adapters::map_windows::Buffer",
                        "buffer"
                      |)
                    ]
                  |)
                ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_buffer_mut_ptr :
          forall (N : Value.t) (T : Ty.t),
          M.IsAssociatedFunction (Self N T) "buffer_mut_ptr" (buffer_mut_ptr N T).
        
        (*
            fn as_array_ref(&self) -> &[T; N] {
                debug_assert!(self.start + N <= 2 * N);
        
                // SAFETY: our invariant guarantees these elements are initialized.
                unsafe { &*self.buffer_ptr().add(self.start).cast() }
            }
        *)
        Definition as_array_ref
            (N : Value.t)
            (T : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N T in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                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.le (|
                                              BinOp.Wrap.add (|
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| self |),
                                                    "core::iter::adapters::map_windows::Buffer",
                                                    "start"
                                                  |)
                                                |),
                                                M.read (|
                                                  M.get_constant (|
                                                    "core::iter::adapters::map_windows::N"
                                                  |)
                                                |)
                                              |),
                                              BinOp.Wrap.mul (|
                                                Value.Integer IntegerKind.Usize 2,
                                                M.read (|
                                                  M.get_constant (|
                                                    "core::iter::adapters::map_windows::N"
                                                  |)
                                                |)
                                              |)
                                            |)
                                          |)
                                        |)) 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: self.start + N <= 2 * N"
                                            |)
                                          ]
                                        |)
                                      |)
                                    |)));
                                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.apply
                        (Ty.path "*const")
                        []
                        [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ] ],
                      "cast",
                      [ Ty.apply (Ty.path "array") [ N ] [ T ] ]
                    |),
                    [
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "*const")
                            []
                            [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ] ],
                          "add",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "core::iter::adapters::map_windows::Buffer")
                                [ N ]
                                [ T ],
                              "buffer_ptr",
                              []
                            |),
                            [ M.read (| self |) ]
                          |);
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::map_windows::Buffer",
                              "start"
                            |)
                          |)
                        ]
                      |)
                    ]
                  |)
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_as_array_ref :
          forall (N : Value.t) (T : Ty.t),
          M.IsAssociatedFunction (Self N T) "as_array_ref" (as_array_ref N T).
        
        (*
            fn as_uninit_array_mut(&mut self) -> &mut MaybeUninit<[T; N]> {
                debug_assert!(self.start + N <= 2 * N);
        
                // SAFETY: our invariant guarantees these elements are in bounds.
                unsafe { &mut *self.buffer_mut_ptr().add(self.start).cast() }
            }
        *)
        Definition as_uninit_array_mut
            (N : Value.t)
            (T : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N T in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                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.le (|
                                              BinOp.Wrap.add (|
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| self |),
                                                    "core::iter::adapters::map_windows::Buffer",
                                                    "start"
                                                  |)
                                                |),
                                                M.read (|
                                                  M.get_constant (|
                                                    "core::iter::adapters::map_windows::N"
                                                  |)
                                                |)
                                              |),
                                              BinOp.Wrap.mul (|
                                                Value.Integer IntegerKind.Usize 2,
                                                M.read (|
                                                  M.get_constant (|
                                                    "core::iter::adapters::map_windows::N"
                                                  |)
                                                |)
                                              |)
                                            |)
                                          |)
                                        |)) 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: self.start + N <= 2 * N"
                                            |)
                                          ]
                                        |)
                                      |)
                                    |)));
                                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.apply
                        (Ty.path "*mut")
                        []
                        [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ] ],
                      "cast",
                      [
                        Ty.apply
                          (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                          []
                          [ Ty.apply (Ty.path "array") [ N ] [ T ] ]
                      ]
                    |),
                    [
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "*mut")
                            []
                            [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ] ],
                          "add",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "core::iter::adapters::map_windows::Buffer")
                                [ N ]
                                [ T ],
                              "buffer_mut_ptr",
                              []
                            |),
                            [ M.read (| self |) ]
                          |);
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::map_windows::Buffer",
                              "start"
                            |)
                          |)
                        ]
                      |)
                    ]
                  |)
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_as_uninit_array_mut :
          forall (N : Value.t) (T : Ty.t),
          M.IsAssociatedFunction (Self N T) "as_uninit_array_mut" (as_uninit_array_mut N T).
        
        (*
            fn push(&mut self, next: T) {
                let buffer_mut_ptr = self.buffer_mut_ptr();
                debug_assert!(self.start + N <= 2 * N);
        
                let to_drop = if self.start == N {
                    // We have reached the end of our buffer and have to copy
                    // everything to the start. Example layout for N = 3.
                    //
                    //    0   1   2   3   4   5            0   1   2   3   4   5
                    //  ┌───┬───┬───┬───┬───┬───┐        ┌───┬───┬───┬───┬───┬───┐
                    //  │ - │ - │ - │ a │ b │ c │   ->   │ b │ c │ n │ - │ - │ - │
                    //  └───┴───┴───┴───┴───┴───┘        └───┴───┴───┴───┴───┴───┘
                    //                ↑                    ↑
                    //              start                start
        
                    // SAFETY: the two pointers are valid for reads/writes of N -1
                    // elements because our array's size is semantically 2 * N. The
                    // regions also don't overlap for the same reason.
                    //
                    // We leave the old elements in place. As soon as `start` is set
                    // to 0, we treat them as uninitialized and treat their copies
                    // as initialized.
                    let to_drop = unsafe {
                        ptr::copy_nonoverlapping(buffer_mut_ptr.add(self.start + 1), buffer_mut_ptr, N - 1);
                        ( *buffer_mut_ptr.add(N - 1)).write(next);
                        buffer_mut_ptr.add(self.start)
                    };
                    self.start = 0;
                    to_drop
                } else {
                    // SAFETY: `self.start` is < N as guaranteed by the invariant
                    // plus the check above. Even if the drop at the end panics,
                    // the invariant is upheld.
                    //
                    // Example layout for N = 3:
                    //
                    //    0   1   2   3   4   5            0   1   2   3   4   5
                    //  ┌───┬───┬───┬───┬───┬───┐        ┌───┬───┬───┬───┬───┬───┐
                    //  │ - │ a │ b │ c │ - │ - │   ->   │ - │ - │ b │ c │ n │ - │
                    //  └───┴───┴───┴───┴───┴───┘        └───┴───┴───┴───┴───┴───┘
                    //        ↑                                    ↑
                    //      start                                start
                    //
                    let to_drop = unsafe {
                        ( *buffer_mut_ptr.add(self.start + N)).write(next);
                        buffer_mut_ptr.add(self.start)
                    };
                    self.start += 1;
                    to_drop
                };
        
                // SAFETY: the index is valid and this is element `a` in the
                // diagram above and has not been dropped yet.
                unsafe { ptr::drop_in_place(to_drop.cast::<T>()) };
            }
        *)
        Definition push
            (N : Value.t)
            (T : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N T in
          match ε, τ, α with
          | [], [], [ self; next ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let next := M.alloc (| next |) in
              M.read (|
                let~ buffer_mut_ptr :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply (Ty.path "core::iter::adapters::map_windows::Buffer") [ N ] [ T ],
                        "buffer_mut_ptr",
                        []
                      |),
                      [ M.read (| self |) ]
                    |)
                  |) 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.le (|
                                              BinOp.Wrap.add (|
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| self |),
                                                    "core::iter::adapters::map_windows::Buffer",
                                                    "start"
                                                  |)
                                                |),
                                                M.read (|
                                                  M.get_constant (|
                                                    "core::iter::adapters::map_windows::N"
                                                  |)
                                                |)
                                              |),
                                              BinOp.Wrap.mul (|
                                                Value.Integer IntegerKind.Usize 2,
                                                M.read (|
                                                  M.get_constant (|
                                                    "core::iter::adapters::map_windows::N"
                                                  |)
                                                |)
                                              |)
                                            |)
                                          |)
                                        |)) 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: self.start + N <= 2 * N"
                                            |)
                                          ]
                                        |)
                                      |)
                                    |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          M.alloc (| Value.Tuple [] |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let~ to_drop :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.eq (|
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "core::iter::adapters::map_windows::Buffer",
                                        "start"
                                      |)
                                    |),
                                    M.read (|
                                      M.get_constant (| "core::iter::adapters::map_windows::N" |)
                                    |)
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ to_drop :=
                              M.copy (|
                                let~ _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (|
                                        "core::intrinsics::copy_nonoverlapping",
                                        [
                                          Ty.apply
                                            (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                                            []
                                            [ T ]
                                        ]
                                      |),
                                      [
                                        (* MutToConstPointer *)
                                        M.pointer_coercion
                                          (M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "*mut")
                                                []
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                                                    []
                                                    [ T ]
                                                ],
                                              "add",
                                              []
                                            |),
                                            [
                                              M.read (| buffer_mut_ptr |);
                                              BinOp.Wrap.add (|
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| self |),
                                                    "core::iter::adapters::map_windows::Buffer",
                                                    "start"
                                                  |)
                                                |),
                                                Value.Integer IntegerKind.Usize 1
                                              |)
                                            ]
                                          |));
                                        M.read (| buffer_mut_ptr |);
                                        BinOp.Wrap.sub (|
                                          M.read (|
                                            M.get_constant (|
                                              "core::iter::adapters::map_windows::N"
                                            |)
                                          |),
                                          Value.Integer IntegerKind.Usize 1
                                        |)
                                      ]
                                    |)
                                  |) in
                                let~ _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                                          []
                                          [ T ],
                                        "write",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "*mut")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                                                  []
                                                  [ T ]
                                              ],
                                            "add",
                                            []
                                          |),
                                          [
                                            M.read (| buffer_mut_ptr |);
                                            BinOp.Wrap.sub (|
                                              M.read (|
                                                M.get_constant (|
                                                  "core::iter::adapters::map_windows::N"
                                                |)
                                              |),
                                              Value.Integer IntegerKind.Usize 1
                                            |)
                                          ]
                                        |);
                                        M.read (| next |)
                                      ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "*mut")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                                            []
                                            [ T ]
                                        ],
                                      "add",
                                      []
                                    |),
                                    [
                                      M.read (| buffer_mut_ptr |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| self |),
                                          "core::iter::adapters::map_windows::Buffer",
                                          "start"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)
                              |) in
                            let~ _ :=
                              M.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "core::iter::adapters::map_windows::Buffer",
                                  "start"
                                |),
                                Value.Integer IntegerKind.Usize 0
                              |) in
                            to_drop));
                        fun γ =>
                          ltac:(M.monadic
                            (let~ to_drop :=
                              M.copy (|
                                let~ _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                                          []
                                          [ T ],
                                        "write",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "*mut")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                                                  []
                                                  [ T ]
                                              ],
                                            "add",
                                            []
                                          |),
                                          [
                                            M.read (| buffer_mut_ptr |);
                                            BinOp.Wrap.add (|
                                              M.read (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| self |),
                                                  "core::iter::adapters::map_windows::Buffer",
                                                  "start"
                                                |)
                                              |),
                                              M.read (|
                                                M.get_constant (|
                                                  "core::iter::adapters::map_windows::N"
                                                |)
                                              |)
                                            |)
                                          ]
                                        |);
                                        M.read (| next |)
                                      ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "*mut")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                                            []
                                            [ T ]
                                        ],
                                      "add",
                                      []
                                    |),
                                    [
                                      M.read (| buffer_mut_ptr |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| self |),
                                          "core::iter::adapters::map_windows::Buffer",
                                          "start"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)
                              |) in
                            let~ _ :=
                              let β :=
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "core::iter::adapters::map_windows::Buffer",
                                  "start"
                                |) in
                              M.write (|
                                β,
                                BinOp.Wrap.add (|
                                  M.read (| β |),
                                  Value.Integer IntegerKind.Usize 1
                                |)
                              |) in
                            to_drop))
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_function (| "core::ptr::drop_in_place", [ T ] |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "*mut")
                              []
                              [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ]
                              ],
                            "cast",
                            [ T ]
                          |),
                          [ M.read (| to_drop |) ]
                        |)
                      ]
                    |)
                  |) in
                M.alloc (| Value.Tuple [] |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_push :
          forall (N : Value.t) (T : Ty.t),
          M.IsAssociatedFunction (Self N T) "push" (push N T).
      End Impl_core_iter_adapters_map_windows_Buffer_N_T.
      
      Module Impl_core_clone_Clone_where_core_clone_Clone_T_for_core_iter_adapters_map_windows_Buffer_N_T.
        Definition Self (N : Value.t) (T : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::map_windows::Buffer") [ N ] [ T ].
        
        (*
            fn clone(&self) -> Self {
                let mut buffer = Buffer {
                    buffer: [[const { MaybeUninit::uninit() }; N], [const { MaybeUninit::uninit() }; N]],
                    start: self.start,
                };
                buffer.as_uninit_array_mut().write(self.as_array_ref().clone());
                buffer
            }
        *)
        Definition clone
            (N : Value.t)
            (T : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N T in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                let~ buffer :=
                  M.alloc (|
                    Value.StructRecord
                      "core::iter::adapters::map_windows::Buffer"
                      [
                        ("buffer",
                          Value.Array
                            [
                              repeat (|
                                M.read (|
                                  M.get_constant (|
                                    "core::iter::adapters::map_windows::clone_discriminant"
                                  |)
                                |),
                                N
                              |);
                              repeat (|
                                M.read (|
                                  M.get_constant (|
                                    "core::iter::adapters::map_windows::clone_discriminant"
                                  |)
                                |),
                                N
                              |)
                            ]);
                        ("start",
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::map_windows::Buffer",
                              "start"
                            |)
                          |))
                      ]
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                          []
                          [ Ty.apply (Ty.path "array") [ N ] [ T ] ],
                        "write",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::iter::adapters::map_windows::Buffer")
                              [ N ]
                              [ T ],
                            "as_uninit_array_mut",
                            []
                          |),
                          [ buffer ]
                        |);
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::clone::Clone",
                            Ty.apply (Ty.path "array") [ N ] [ T ],
                            [],
                            "clone",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "core::iter::adapters::map_windows::Buffer")
                                  [ N ]
                                  [ T ],
                                "as_array_ref",
                                []
                              |),
                              [ M.read (| self |) ]
                            |)
                          ]
                        |)
                      ]
                    |)
                  |) in
                buffer
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (N : Value.t) (T : Ty.t),
          M.IsTraitInstance
            "core::clone::Clone"
            (Self N T)
            (* Trait polymorphic types *) []
            (* Instance *) [ ("clone", InstanceField.Method (clone N T)) ].
      End Impl_core_clone_Clone_where_core_clone_Clone_T_for_core_iter_adapters_map_windows_Buffer_N_T.
      
      Module Impl_core_clone_Clone_where_core_iter_traits_iterator_Iterator_I_where_core_clone_Clone_I_where_core_clone_Clone_associated_type_for_core_iter_adapters_map_windows_MapWindowsInner_N_I.
        Definition Self (N : Value.t) (I : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::map_windows::MapWindowsInner") [ N ] [ I ].
        
        (*
            fn clone(&self) -> Self {
                Self { iter: self.iter.clone(), buffer: self.buffer.clone() }
            }
        *)
        Definition clone
            (N : Value.t)
            (I : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N I in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              Value.StructRecord
                "core::iter::adapters::map_windows::MapWindowsInner"
                [
                  ("iter",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::clone::Clone",
                        Ty.apply (Ty.path "core::option::Option") [] [ I ],
                        [],
                        "clone",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::map_windows::MapWindowsInner",
                          "iter"
                        |)
                      ]
                    |));
                  ("buffer",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::clone::Clone",
                        Ty.apply
                          (Ty.path "core::option::Option")
                          []
                          [
                            Ty.apply
                              (Ty.path "core::iter::adapters::map_windows::Buffer")
                              [ N ]
                              [ Ty.associated ]
                          ],
                        [],
                        "clone",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::map_windows::MapWindowsInner",
                          "buffer"
                        |)
                      ]
                    |))
                ]))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (N : Value.t) (I : Ty.t),
          M.IsTraitInstance
            "core::clone::Clone"
            (Self N I)
            (* Trait polymorphic types *) []
            (* Instance *) [ ("clone", InstanceField.Method (clone N I)) ].
      End Impl_core_clone_Clone_where_core_iter_traits_iterator_Iterator_I_where_core_clone_Clone_I_where_core_clone_Clone_associated_type_for_core_iter_adapters_map_windows_MapWindowsInner_N_I.
      
      Module Impl_core_ops_drop_Drop_for_core_iter_adapters_map_windows_Buffer_N_T.
        Definition Self (N : Value.t) (T : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::map_windows::Buffer") [ N ] [ T ].
        
        (*
            fn drop(&mut self) {
                // SAFETY: our invariant guarantees that N elements starting from
                // `self.start` are initialized. We drop them here.
                unsafe {
                    let initialized_part: *mut [T] = crate::ptr::slice_from_raw_parts_mut(
                        self.buffer_mut_ptr().add(self.start).cast(),
                        N,
                    );
                    ptr::drop_in_place(initialized_part);
                }
            }
        *)
        Definition drop
            (N : Value.t)
            (T : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N T in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                let~ initialized_part :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "*mut")
                              []
                              [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [] [ T ]
                              ],
                            "cast",
                            [ T ]
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "*mut")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "core::mem::maybe_uninit::MaybeUninit")
                                      []
                                      [ T ]
                                  ],
                                "add",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::iter::adapters::map_windows::Buffer")
                                      [ N ]
                                      [ T ],
                                    "buffer_mut_ptr",
                                    []
                                  |),
                                  [ M.read (| self |) ]
                                |);
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "core::iter::adapters::map_windows::Buffer",
                                    "start"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |);
                        M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_function (|
                        "core::ptr::drop_in_place",
                        [ Ty.apply (Ty.path "slice") [] [ T ] ]
                      |),
                      [ M.read (| initialized_part |) ]
                    |)
                  |) in
                M.alloc (| Value.Tuple [] |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (N : Value.t) (T : Ty.t),
          M.IsTraitInstance
            "core::ops::drop::Drop"
            (Self N T)
            (* Trait polymorphic types *) []
            (* Instance *) [ ("drop", InstanceField.Method (drop N T)) ].
      End Impl_core_ops_drop_Drop_for_core_iter_adapters_map_windows_Buffer_N_T.
      
      Module Impl_core_iter_traits_iterator_Iterator_where_core_iter_traits_iterator_Iterator_I_where_core_ops_function_FnMut_F_Tuple_ref__array_N_associated_type__for_core_iter_adapters_map_windows_MapWindows_N_I_F.
        Definition Self (N : Value.t) (I F R : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::map_windows::MapWindows") [ N ] [ I; F ].
        
        (*     type Item = R; *)
        Definition _Item (N : Value.t) (I F R : Ty.t) : Ty.t := R.
        
        (*
            fn next(&mut self) -> Option<Self::Item> {
                let window = self.inner.next_window()?;
                let out = (self.f)(window);
                Some(out)
            }
        *)
        Definition next
            (N : Value.t)
            (I F R : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N I F R in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.catch_return (|
                ltac:(M.monadic
                  (M.read (|
                    let~ window :=
                      M.copy (|
                        M.match_operator (|
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::try_trait::Try",
                                Ty.apply
                                  (Ty.path "core::option::Option")
                                  []
                                  [
                                    Ty.apply
                                      (Ty.path "&")
                                      []
                                      [ Ty.apply (Ty.path "array") [ N ] [ Ty.associated ] ]
                                  ],
                                [],
                                "branch",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::iter::adapters::map_windows::MapWindowsInner")
                                      [ N ]
                                      [ I ],
                                    "next_window",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "core::iter::adapters::map_windows::MapWindows",
                                      "inner"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          |),
                          [
                            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::option::Option") [] [ R ],
                                            [
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                []
                                                [ Ty.path "core::convert::Infallible" ]
                                            ],
                                            "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~ out :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::function::FnMut",
                            F,
                            [
                              Ty.tuple
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    []
                                    [ Ty.apply (Ty.path "array") [ N ] [ Ty.associated ] ]
                                ]
                            ],
                            "call_mut",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::map_windows::MapWindows",
                              "f"
                            |);
                            Value.Tuple [ M.read (| window |) ]
                          ]
                        |)
                      |) in
                    M.alloc (|
                      Value.StructTuple "core::option::Option::Some" [ M.read (| out |) ]
                    |)
                  |)))
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            fn size_hint(&self) -> (usize, Option<usize>) {
                self.inner.size_hint()
            }
        *)
        Definition size_hint
            (N : Value.t)
            (I F R : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N I F R in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "core::iter::adapters::map_windows::MapWindowsInner")
                    [ N ]
                    [ I ],
                  "size_hint",
                  []
                |),
                [
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "core::iter::adapters::map_windows::MapWindows",
                    "inner"
                  |)
                ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (N : Value.t) (I F R : Ty.t),
          M.IsTraitInstance
            "core::iter::traits::iterator::Iterator"
            (Self N I F R)
            (* Trait polymorphic types *) []
            (* Instance *)
            [
              ("Item", InstanceField.Ty (_Item N I F R));
              ("next", InstanceField.Method (next N I F R));
              ("size_hint", InstanceField.Method (size_hint N I F R))
            ].
      End Impl_core_iter_traits_iterator_Iterator_where_core_iter_traits_iterator_Iterator_I_where_core_ops_function_FnMut_F_Tuple_ref__array_N_associated_type__for_core_iter_adapters_map_windows_MapWindows_N_I_F.
      
      Module Impl_core_iter_traits_marker_FusedIterator_where_core_iter_traits_iterator_Iterator_I_where_core_ops_function_FnMut_F_Tuple_ref__array_N_associated_type__for_core_iter_adapters_map_windows_MapWindows_N_I_F.
        Definition Self (N : Value.t) (I F R : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::map_windows::MapWindows") [ N ] [ I; F ].
        
        Axiom Implements :
          forall (N : Value.t) (I F R : Ty.t),
          M.IsTraitInstance
            "core::iter::traits::marker::FusedIterator"
            (Self N I F R)
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_iter_traits_marker_FusedIterator_where_core_iter_traits_iterator_Iterator_I_where_core_ops_function_FnMut_F_Tuple_ref__array_N_associated_type__for_core_iter_adapters_map_windows_MapWindows_N_I_F.
      
      Module Impl_core_iter_traits_exact_size_ExactSizeIterator_where_core_iter_traits_exact_size_ExactSizeIterator_I_where_core_ops_function_FnMut_F_Tuple_ref__array_N_associated_type__for_core_iter_adapters_map_windows_MapWindows_N_I_F.
        Definition Self (N : Value.t) (I F R : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::map_windows::MapWindows") [ N ] [ I; F ].
        
        Axiom Implements :
          forall (N : Value.t) (I F R : Ty.t),
          M.IsTraitInstance
            "core::iter::traits::exact_size::ExactSizeIterator"
            (Self N I F R)
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_iter_traits_exact_size_ExactSizeIterator_where_core_iter_traits_exact_size_ExactSizeIterator_I_where_core_ops_function_FnMut_F_Tuple_ref__array_N_associated_type__for_core_iter_adapters_map_windows_MapWindows_N_I_F.
      
      Module Impl_core_fmt_Debug_where_core_iter_traits_iterator_Iterator_I_where_core_fmt_Debug_I_for_core_iter_adapters_map_windows_MapWindows_N_I_F.
        Definition Self (N : Value.t) (I F : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::map_windows::MapWindows") [ N ] [ I; F ].
        
        (*
            fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
                f.debug_struct("MapWindows").field("iter", &self.inner.iter).finish()
            }
        *)
        Definition fmt
            (N : Value.t)
            (I F : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N I F 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 "MapWindows" |) ]
                        |)
                      |);
                      M.read (| Value.String "iter" |);
                      M.SubPointer.get_struct_record_field (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::map_windows::MapWindows",
                          "inner"
                        |),
                        "core::iter::adapters::map_windows::MapWindowsInner",
                        "iter"
                      |)
                    ]
                  |)
                ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (N : Value.t) (I F : Ty.t),
          M.IsTraitInstance
            "core::fmt::Debug"
            (Self N I F)
            (* Trait polymorphic types *) []
            (* Instance *) [ ("fmt", InstanceField.Method (fmt N I F)) ].
      End Impl_core_fmt_Debug_where_core_iter_traits_iterator_Iterator_I_where_core_fmt_Debug_I_for_core_iter_adapters_map_windows_MapWindows_N_I_F.
      
      Module Impl_core_clone_Clone_where_core_iter_traits_iterator_Iterator_I_where_core_clone_Clone_I_where_core_clone_Clone_F_where_core_clone_Clone_associated_type_for_core_iter_adapters_map_windows_MapWindows_N_I_F.
        Definition Self (N : Value.t) (I F : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::map_windows::MapWindows") [ N ] [ I; F ].
        
        (*
            fn clone(&self) -> Self {
                Self { f: self.f.clone(), inner: self.inner.clone() }
            }
        *)
        Definition clone
            (N : Value.t)
            (I F : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self N I F in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              Value.StructRecord
                "core::iter::adapters::map_windows::MapWindows"
                [
                  ("f",
                    M.call_closure (|
                      M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::map_windows::MapWindows",
                          "f"
                        |)
                      ]
                    |));
                  ("inner",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::clone::Clone",
                        Ty.apply
                          (Ty.path "core::iter::adapters::map_windows::MapWindowsInner")
                          [ N ]
                          [ I ],
                        [],
                        "clone",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::map_windows::MapWindows",
                          "inner"
                        |)
                      ]
                    |))
                ]))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (N : Value.t) (I F : Ty.t),
          M.IsTraitInstance
            "core::clone::Clone"
            (Self N I F)
            (* Trait polymorphic types *) []
            (* Instance *) [ ("clone", InstanceField.Method (clone N I F)) ].
      End Impl_core_clone_Clone_where_core_iter_traits_iterator_Iterator_I_where_core_clone_Clone_I_where_core_clone_Clone_F_where_core_clone_Clone_associated_type_for_core_iter_adapters_map_windows_MapWindows_N_I_F.
    End map_windows.
  End adapters.
End iter.
