Full Code of AeneasVerif/eurydice for AI

main 4e769f096186 cached
346 files
5.3 MB
1.4M tokens
5334 symbols
1 requests
Download .txt
Showing preview only (5,587K chars total). Download the full file or copy to clipboard to get everything.
Repository: AeneasVerif/eurydice
Branch: main
Commit: 4e769f096186
Files: 346
Total size: 5.3 MB

Directory structure:
gitextract_fzr909fs/

├── .github/
│   └── workflows/
│       └── nix.yaml
├── .gitignore
├── .ocamlformat
├── .ocamlformat-ignore
├── LICENSE-APACHE
├── LICENSE-MIT
├── Makefile
├── README.md
├── bin/
│   ├── dune
│   └── main.ml
├── cremepat/
│   ├── Lex.ml
│   ├── Parse.mly
│   ├── ParseTree.ml
│   ├── README.md
│   ├── cremepat.ml
│   └── dune
├── dune
├── dune-project
├── eurydice.opam
├── flake.nix
├── include/
│   └── eurydice_glue.h
├── lib/
│   ├── AstOfLlbc.ml
│   ├── Builtin.ml
│   ├── Bundles.ml
│   ├── Cleanup1.ml
│   ├── Cleanup2.ml
│   ├── Cleanup3.ml
│   ├── LoadLlbc.ml
│   ├── Logging.ml
│   ├── Options.ml
│   ├── PreCleanup.ml
│   ├── Utf8.ml
│   └── dune
├── out/
│   ├── test-array/
│   │   ├── array.c
│   │   └── array.h
│   ├── test-array2d/
│   │   ├── array2d.c
│   │   └── array2d.h
│   ├── test-castunsize/
│   │   ├── castunsize.c
│   │   └── castunsize.h
│   ├── test-closure/
│   │   ├── closure.c
│   │   └── closure.h
│   ├── test-closure_fn_cast/
│   │   ├── closure_fn_cast.c
│   │   └── closure_fn_cast.h
│   ├── test-collision/
│   │   ├── collision.c
│   │   └── collision.h
│   ├── test-const_generics/
│   │   ├── const_generics.c
│   │   └── const_generics.h
│   ├── test-core_num/
│   │   ├── core_num.c
│   │   └── core_num.h
│   ├── test-dst/
│   │   ├── dst.c
│   │   └── dst.h
│   ├── test-dyn_trait_struct_type/
│   │   ├── dyn_trait_struct_type.c
│   │   └── dyn_trait_struct_type.h
│   ├── test-floating_points/
│   │   ├── floating_points.c
│   │   └── floating_points.h
│   ├── test-fn_cast/
│   │   ├── fn_cast.c
│   │   └── fn_cast.h
│   ├── test-fn_higher_order/
│   │   ├── fn_higher_order.c
│   │   └── fn_higher_order.h
│   ├── test-for/
│   │   ├── for.c
│   │   └── for.h
│   ├── test-global_ref/
│   │   ├── global_ref.c
│   │   └── global_ref.h
│   ├── test-i32_shl/
│   │   ├── i32_shl.c
│   │   └── i32_shl.h
│   ├── test-inline_attributes/
│   │   ├── inline_attributes.c
│   │   └── inline_attributes.h
│   ├── test-int_switch/
│   │   ├── int_switch.c
│   │   └── int_switch.h
│   ├── test-issue_102/
│   │   ├── issue_102.c
│   │   └── issue_102.h
│   ├── test-issue_104/
│   │   ├── issue_104.c
│   │   └── issue_104.h
│   ├── test-issue_105/
│   │   ├── issue_105.c
│   │   └── issue_105.h
│   ├── test-issue_106/
│   │   ├── issue_106.c
│   │   └── issue_106.h
│   ├── test-issue_107/
│   │   ├── issue_107.c
│   │   └── issue_107.h
│   ├── test-issue_123/
│   │   ├── issue_123.c
│   │   └── issue_123.h
│   ├── test-issue_128/
│   │   ├── issue_128.c
│   │   └── issue_128.h
│   ├── test-issue_212/
│   │   ├── issue_212.c
│   │   └── issue_212.h
│   ├── test-issue_37/
│   │   ├── issue_37.c
│   │   └── issue_37.h
│   ├── test-issue_49/
│   │   ├── issue_49.c
│   │   └── issue_49.h
│   ├── test-issue_96/
│   │   ├── issue_96.c
│   │   └── issue_96.h
│   ├── test-issue_k630/
│   │   ├── issue_k630.c
│   │   └── issue_k630.h
│   ├── test-issue_shift/
│   │   ├── issue_shift.c
│   │   └── issue_shift.h
│   ├── test-libcrux-ml-dsa/
│   │   ├── internal/
│   │   │   ├── libcrux_mldsa_avx2.h
│   │   │   ├── libcrux_mldsa_core.h
│   │   │   ├── libcrux_mldsa_portable.h
│   │   │   ├── libcrux_sha3_avx2.h
│   │   │   └── libcrux_sha3_internal.h
│   │   ├── libcrux_mldsa44_avx2.c
│   │   ├── libcrux_mldsa44_avx2.h
│   │   ├── libcrux_mldsa44_portable.c
│   │   ├── libcrux_mldsa44_portable.h
│   │   ├── libcrux_mldsa65_avx2.c
│   │   ├── libcrux_mldsa65_avx2.h
│   │   ├── libcrux_mldsa65_portable.c
│   │   ├── libcrux_mldsa65_portable.h
│   │   ├── libcrux_mldsa87_avx2.c
│   │   ├── libcrux_mldsa87_avx2.h
│   │   ├── libcrux_mldsa87_portable.c
│   │   ├── libcrux_mldsa87_portable.h
│   │   ├── libcrux_mldsa_avx2.c
│   │   ├── libcrux_mldsa_avx2.h
│   │   ├── libcrux_mldsa_core.c
│   │   ├── libcrux_mldsa_core.h
│   │   ├── libcrux_mldsa_portable.c
│   │   ├── libcrux_mldsa_portable.h
│   │   ├── libcrux_sha3.h
│   │   ├── libcrux_sha3_avx2.c
│   │   ├── libcrux_sha3_avx2.h
│   │   └── libcrux_sha3_internal.h
│   ├── test-libcrux-ml-kem/
│   │   ├── internal/
│   │   │   ├── libcrux_core.h
│   │   │   ├── libcrux_mlkem1024_avx2.h
│   │   │   ├── libcrux_mlkem1024_portable.h
│   │   │   ├── libcrux_mlkem512_avx2.h
│   │   │   ├── libcrux_mlkem512_portable.h
│   │   │   ├── libcrux_mlkem768_avx2.h
│   │   │   ├── libcrux_mlkem768_portable.h
│   │   │   ├── libcrux_mlkem_avx2.h
│   │   │   ├── libcrux_mlkem_portable.h
│   │   │   └── libcrux_sha3_internal.h
│   │   ├── libcrux_core.c
│   │   ├── libcrux_core.h
│   │   ├── libcrux_mlkem1024.h
│   │   ├── libcrux_mlkem1024_avx2.c
│   │   ├── libcrux_mlkem1024_avx2.h
│   │   ├── libcrux_mlkem1024_portable.c
│   │   ├── libcrux_mlkem1024_portable.h
│   │   ├── libcrux_mlkem512.h
│   │   ├── libcrux_mlkem512_avx2.c
│   │   ├── libcrux_mlkem512_avx2.h
│   │   ├── libcrux_mlkem512_portable.c
│   │   ├── libcrux_mlkem512_portable.h
│   │   ├── libcrux_mlkem768.h
│   │   ├── libcrux_mlkem768_avx2.c
│   │   ├── libcrux_mlkem768_avx2.h
│   │   ├── libcrux_mlkem768_portable.c
│   │   ├── libcrux_mlkem768_portable.h
│   │   ├── libcrux_mlkem_avx2.c
│   │   ├── libcrux_mlkem_avx2.h
│   │   ├── libcrux_mlkem_portable.c
│   │   ├── libcrux_mlkem_portable.h
│   │   ├── libcrux_sha3_avx2.c
│   │   ├── libcrux_sha3_avx2.h
│   │   ├── libcrux_sha3_internal.h
│   │   ├── libcrux_sha3_portable.c
│   │   └── libcrux_sha3_portable.h
│   ├── test-libcrux-ml-kem-no-const/
│   │   ├── internal/
│   │   │   ├── libcrux_core.h
│   │   │   ├── libcrux_mlkem1024_avx2.h
│   │   │   ├── libcrux_mlkem1024_portable.h
│   │   │   ├── libcrux_mlkem512_avx2.h
│   │   │   ├── libcrux_mlkem512_portable.h
│   │   │   ├── libcrux_mlkem768_avx2.h
│   │   │   ├── libcrux_mlkem768_portable.h
│   │   │   ├── libcrux_mlkem_avx2.h
│   │   │   ├── libcrux_mlkem_portable.h
│   │   │   └── libcrux_sha3_internal.h
│   │   ├── libcrux_core.c
│   │   ├── libcrux_core.h
│   │   ├── libcrux_mlkem1024.h
│   │   ├── libcrux_mlkem1024_avx2.c
│   │   ├── libcrux_mlkem1024_avx2.h
│   │   ├── libcrux_mlkem1024_portable.c
│   │   ├── libcrux_mlkem1024_portable.h
│   │   ├── libcrux_mlkem512.h
│   │   ├── libcrux_mlkem512_avx2.c
│   │   ├── libcrux_mlkem512_avx2.h
│   │   ├── libcrux_mlkem512_portable.c
│   │   ├── libcrux_mlkem512_portable.h
│   │   ├── libcrux_mlkem768.h
│   │   ├── libcrux_mlkem768_avx2.c
│   │   ├── libcrux_mlkem768_avx2.h
│   │   ├── libcrux_mlkem768_portable.c
│   │   ├── libcrux_mlkem768_portable.h
│   │   ├── libcrux_mlkem_avx2.c
│   │   ├── libcrux_mlkem_avx2.h
│   │   ├── libcrux_mlkem_portable.c
│   │   ├── libcrux_mlkem_portable.h
│   │   ├── libcrux_sha3_avx2.c
│   │   ├── libcrux_sha3_avx2.h
│   │   ├── libcrux_sha3_internal.h
│   │   ├── libcrux_sha3_portable.c
│   │   └── libcrux_sha3_portable.h
│   ├── test-lvalue/
│   │   ├── lvalue.c
│   │   └── lvalue.h
│   ├── test-mismatch/
│   │   ├── mismatch.c
│   │   └── mismatch.h
│   ├── test-more_dst/
│   │   ├── more_dst.c
│   │   └── more_dst.h
│   ├── test-more_primitive_types/
│   │   ├── more_primitive_types.c
│   │   └── more_primitive_types.h
│   ├── test-more_str/
│   │   ├── more_str.c
│   │   └── more_str.h
│   ├── test-names/
│   │   ├── names.c
│   │   └── names.h
│   ├── test-nested_arrays/
│   │   ├── nested_arrays.c
│   │   └── nested_arrays.h
│   ├── test-nested_arrays2/
│   │   ├── nested_arrays2.c
│   │   └── nested_arrays2.h
│   ├── test-option/
│   │   ├── option.c
│   │   └── option.h
│   ├── test-parentparent/
│   │   ├── parentparent.c
│   │   └── parentparent.h
│   ├── test-partial_eq/
│   │   ├── partial_eq.c
│   │   └── partial_eq.h
│   ├── test-raw_pointers/
│   │   ├── raw_pointers.c
│   │   └── raw_pointers.h
│   ├── test-reborrow/
│   │   ├── reborrow.c
│   │   └── reborrow.h
│   ├── test-recursion/
│   │   ├── recursion.c
│   │   └── recursion.h
│   ├── test-repeat/
│   │   ├── repeat.c
│   │   └── repeat.h
│   ├── test-result/
│   │   ├── result.c
│   │   └── result.h
│   ├── test-signed_wrapping/
│   │   ├── signed_wrapping.c
│   │   └── signed_wrapping.h
│   ├── test-slice_array/
│   │   ├── slice_array.c
│   │   └── slice_array.h
│   ├── test-step_by/
│   │   ├── step_by.c
│   │   └── step_by.h
│   ├── test-substr/
│   │   ├── substr.c
│   │   └── substr.h
│   ├── test-symcrust/
│   │   ├── internal/
│   │   │   └── Eurydice.h
│   │   ├── symcrust.c
│   │   └── symcrust.h
│   ├── test-trait_generics/
│   │   ├── trait_generics.c
│   │   └── trait_generics.h
│   ├── test-traits/
│   │   ├── traits.c
│   │   └── traits.h
│   ├── test-traits2/
│   │   ├── traits2.c
│   │   └── traits2.h
│   ├── test-traits3/
│   │   ├── traits3.c
│   │   └── traits3.h
│   ├── test-we_need_charon_monomorphization/
│   │   ├── we_need_charon_monomorphization.c
│   │   └── we_need_charon_monomorphization.h
│   ├── test-where_clauses_closures/
│   │   ├── where_clauses_closures.c
│   │   └── where_clauses_closures.h
│   ├── test-where_clauses_fncg/
│   │   ├── where_clauses_fncg.c
│   │   └── where_clauses_fncg.h
│   ├── test-where_clauses_simple/
│   │   ├── where_clauses_simple.c
│   │   └── where_clauses_simple.h
│   └── testxx-result/
│       ├── result.cc
│       └── result.h
├── scripts/
│   ├── check-dependency.sh
│   ├── ci-check-charon-pin-is-forward.sh
│   ├── ci-check-charon-pin-is-merged.sh
│   ├── format.sh
│   └── update-charon-pin.sh
└── test/
    ├── array.rs
    ├── array2d.rs
    ├── castunsize.rs
    ├── chunks.rs
    ├── closure.rs
    ├── closure_fn_cast.rs
    ├── collision.rs
    ├── const_generics.rs
    ├── core_cmp_lib.c
    ├── core_num.rs
    ├── core_str_lib.c
    ├── dst.rs
    ├── dyn_trait_struct_type.rs
    ├── floating_points.rs
    ├── fn_cast.rs
    ├── fn_higher_order.rs
    ├── for.rs
    ├── global_ref.rs
    ├── i32_shl.rs
    ├── inline_attributes.rs
    ├── int_switch.rs
    ├── issue_102.rs
    ├── issue_104.rs
    ├── issue_105.rs
    ├── issue_106.rs
    ├── issue_107.rs
    ├── issue_123.rs
    ├── issue_128.rs
    ├── issue_14.rs
    ├── issue_212.rs
    ├── issue_311.rs
    ├── issue_37.rs
    ├── issue_49.rs
    ├── issue_96.rs
    ├── issue_99.rs
    ├── issue_k630.rs
    ├── issue_shift.rs
    ├── libcrux-ml-dsa/
    │   ├── CMakeLists.txt
    │   ├── c.yaml
    │   └── tests/
    │       ├── mldsa65.cc
    │       ├── nistkats-65.json
    │       └── nistkats_pre_hashed-65.json
    ├── libcrux-ml-kem/
    │   ├── CMakeLists.txt
    │   ├── c.yaml
    │   ├── intrinsics/
    │   │   └── libcrux_intrinsics_avx2.h
    │   └── tests/
    │       ├── mlkem768.cc
    │       ├── mlkem768_nistkats.json
    │       └── sha3.cc
    ├── lvalue.rs
    ├── main.c
    ├── mismatch.rs
    ├── more_dst.rs
    ├── more_primitive_types.rs
    ├── more_primitive_types.yaml
    ├── more_str.rs
    ├── mutable_slice_range.rs
    ├── names.rs
    ├── nested_arrays.rs
    ├── nested_arrays2.rs
    ├── option.rs
    ├── parentparent.rs
    ├── partial_eq.rs
    ├── partial_eq_stubs.c
    ├── println.rs
    ├── raw_pointers.rs
    ├── reborrow.rs
    ├── recursion.rs
    ├── repeat.rs
    ├── result.rs
    ├── signed_wrapping.rs
    ├── slice_array.rs
    ├── step_by.rs
    ├── substr.rs
    ├── substr.yaml
    ├── substr_impl.c
    ├── substr_stubs.h
    ├── symcrust.rs
    ├── trait_generics.rs
    ├── traits.rs
    ├── traits2.rs
    ├── traits3.rs
    ├── we_need_charon_monomorphization.rs
    ├── where_clauses.rs
    ├── where_clauses_closures.rs
    ├── where_clauses_fncg.rs
    └── where_clauses_simple.rs

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/nix.yaml
================================================
name: Build Eurydice and run tests

on:
  push:
    branches:
      - main
  pull_request:
  workflow_dispatch:

# Cancel previous versions of this job that are still running.
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  check:
    runs-on: self-hosted
    steps:
      - uses: actions/checkout@v3
      - name: Build and test
        run: nix flake check -L

  charon-pin-is-forward:
    runs-on: self-hosted
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0 # deep clone in order to get access to other commits
      - run: nix develop '.#ci' --command ./scripts/ci-check-charon-pin-is-forward.sh

  charon-pin-is-merged:
    runs-on: self-hosted
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0 # deep clone in order to get access to other commits
      - run: nix develop '.#ci' --command ./scripts/ci-check-charon-pin-is-merged.sh


================================================
FILE: .gitignore
================================================
/karamel
/charon
/libcrux

_build
test/*/target
out/*/a.out
*.DS_Store
*.orig
*.llbc
eurydice
/.vscode
.charon_version

test/libcrux-*/build
_opam
.cache


================================================
FILE: .ocamlformat
================================================
profile = default
version = 0.27.0
margin = 100

break-cases = fit-or-vertical
exp-grouping = preserve
if-then-else = vertical
parens-tuple = multi-line-only
parens-tuple-patterns = multi-line-only


================================================
FILE: .ocamlformat-ignore
================================================
lib/charon/**
lib/krml/**


================================================
FILE: LICENSE-APACHE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright 2024 Eurydice Contributors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


================================================
FILE: LICENSE-MIT
================================================
MIT License

Copyright (c) 2024 Eurydice Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: Makefile
================================================
CHARON_HOME 	?= $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/charon
KRML_HOME 	?= $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/karamel
LIBCRUX_HOME 	?= $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/libcrux
EURYDICE	?= ./eurydice $(EURYDICE_FLAGS)
CHARON		?= $(CHARON_HOME)/bin/charon

BROKEN_TESTS		= where_clauses println chunks mutable_slice_range issue_99 issue_14 issue_311
TEST_DIRS		= $(filter-out $(BROKEN_TESTS),$(basename $(notdir $(wildcard test/*.rs))))

# Warn on old versions of bash
_ := $(shell bash -c '(( $${BASH_VERSION%%.*} >= 4 ))')
ifneq ($(.SHELLSTATUS),0)
_: $(error "bash version is too old; hint: brew install bash")
endif

# Warn on old versions of make
ifeq (3.81,$(MAKE_VERSION))
  $(error You seem to be using the OSX antiquated Make version. Hint: brew \
    install make, then invoke gmake instead of make)
endif

# Enable `foo/**` glob syntax
SHELL := bash -O globstar 

ifeq ($(shell uname -s),Darwin)
  ifeq (,$(shell which gsed))
    $(error gsed not found; try brew install gnu-sed)
  endif
  SED=gsed
else
  SED=sed
endif

ifneq ($(shell $(CHARON) version), $(shell cat .charon_version &>/dev/null || true))
  _ := $(shell $(CHARON) version > .charon_version)
endif

.PHONY: all
all: format-check
	@ocamlfind list | grep -q charon || test -L lib/charon || echo "⚠️⚠️⚠️ Charon not found; we suggest run 'make setup-charon'"
	@ocamlfind list | grep -q krml || test -L lib/krml || echo "⚠️⚠️⚠️ krml not found; we suggest run 'make setup-karamel'"
	$(MAKE) build

.PHONY: build
build: check-karamel check-charon
	dune build && ln -sf _build/default/bin/main.exe eurydice

CFLAGS		:= -Wall -Werror -Wno-unused-variable -Wno-unused-but-set-variable $(CFLAGS) -I$(KRML_HOME)/include
CXXFLAGS	:= -std=c++17

test: $(addprefix test-,$(TEST_DIRS)) custom-test-libcrux-ml-kem-no-const custom-test-array custom-test-for testxx-result check-charon check-libcrux test-libcrux-ml-kem

clean-and-test:
	$(MAKE) clean-llbc
	$(MAKE) test

.PRECIOUS: %.llbc
%.llbc: %.rs .charon_version
	# --mir elaborated --add-drop-bounds 
	$(CHARON) rustc --preset=eurydice --dest-file "$@" $(CHARON_EXTRA) -- -Aunused $<

out/test-%/main.c: test/main.c
	mkdir -p out/test-$*
	sed 's/__NAME__/$*/g' $< > $@

test/issue_99.llbc: CHARON_EXTRA = \
  --include=core::option::*::as_ref

test/issue_105.llbc: CHARON_EXTRA = \
  --include=core::result::*::branch \
  --include=core::result::*::from_residual \
  --include=core::result::*::eq \
  --include=core::cmp::* \
  --include=core::convert::*

test/array2d.llbc: CHARON_EXTRA = --include=core::array::equality::*

test/core_num.llbc: CHARON_EXTRA = \
  --include=core::num::*::BITS \
  --include=core::num::*::MAX

test/println.llbc: CHARON_EXTRA = \
  --include=core::fmt::Arguments --include=core::fmt::rt::*::new_const \
  --include=core::fmt::rt::Argument

test/option.llbc: CHARON_EXTRA = \
  --include=core::option::*

test/lvalue.llbc: CHARON_EXTRA = \
  --mir elaborated

test-substr: EXTRA_C = -I../../test ../../test/substr_impl.c
test-substr: EXTRA = --config test/substr.yaml
test-partial_eq: EXTRA_C = ../../test/partial_eq_stubs.c
test-nested_arrays: EXTRA = -funroll-loops 0
test-array: EXTRA = -fcomments
test-symcrust: CFLAGS += -Wno-unused-function
test-more_str: EXTRA_C = ../../test/core_str_lib.c
test-more_primitive_types: EXTRA = --config test/more_primitive_types.yaml
test-global_ref: EXTRA_C = ../../test/core_cmp_lib.c
test-lvalue: CFLAGS += -Wno-unused-but-set-variable
test-issue_shift: CFLAGS += -fsanitize=undefined


test-%: test/%.llbc out/test-%/main.c | all
	$(EURYDICE) $(EXTRA) --output out/test-$* $<
	$(SED) -i 's/  KaRaMeL version: .*//' out/test-$*/**/*.{c,h} # This changes on every commit
	$(SED) -i 's/  KaRaMeL invocation: .*//' out/test-$*/**/*.{c,h} # This changes between local and CI
	cd out/test-$* && $(CC) $(CFLAGS) -I. -I../../include $(EXTRA_C) $*.c main.c && ./a.out

# C++ tests

out/testxx-%/main.cc: test/main.c
	mkdir -p out/testxx-$*
	sed 's/__NAME__/$*/g' $< > $@

testxx-%: test/%.llbc out/testxx-%/main.cc | all
	$(EURYDICE) $(EXTRA) -fc++17-compat --output out/testxx-$* $<
	$(SED) -i 's/  KaRaMeL version: .*//' out/testxx-$*/**/*.{c,h} # This changes on every commit
	$(SED) -i 's/  KaRaMeL invocation: .*//' out/testxx-$*/**/*.{c,h} # This changes between local and CI
	mv out/testxx-$*/$*.c out/testxx-$*/$*.cc
	cd out/testxx-$* && $(CXX) $(CXXFLAGS) $(CFLAGS) -I. -I../../include $(EXTRA_C) $*.cc main.cc && ./a.out

custom-test-array: test-array
	grep -q XXX1 out/test-array/array.c && \
	grep -q XXX2 out/test-array/array.c && \
	true

custom-test-for: test-for
	! grep -q while out/test-for/for.c

# libcrux tests

custom-test-libcrux-ml-kem-no-const: test/libcrux-ml-kem.llbc
	mkdir -p out/test-libcrux-ml-kem-no-const
	$(EURYDICE) --config test/libcrux-ml-kem/c.yaml -funroll-loops 16 \
	  $< --keep-going --output out/test-libcrux-ml-kem-no-const --no-const
	$(SED) -i 's/  KaRaMeL version: .*//' out/test-libcrux-ml-kem-no-const/**/*.{c,h} # This changes on every commit
	$(SED) -i 's/  KaRaMeL invocation: .*//' out/test-libcrux-ml-kem-no-const/**/*.{c,h} # This changes between local and CI

test-libcrux-%: test/libcrux-%.llbc
	mkdir -p out/test-libcrux-$*
	$(EURYDICE) --config test/libcrux-$*/c.yaml -funroll-loops 16 \
	  $< --keep-going --output out/test-libcrux-$*
	$(SED) -i 's/  KaRaMeL version: .*//' out/test-libcrux-$*/**/*.{c,h} # This changes on every commit
	$(SED) -i 's/  KaRaMeL invocation: .*//' out/test-libcrux-$*/**/*.{c,h} # This changes between local and CI
	cd test/libcrux-$*/ && cmake $(CMAKE_FLAGS) -B build -G "Ninja Multi-Config" && cmake --build build --config Debug
	cd test/libcrux-$*/ && ./build/Debug/$(subst -,_,$*)_test
	cd test/libcrux-$*/ && if [ -x ./build/Debug/sha3_test ]; then ./build/Debug/sha3_test; fi


.PHONY: .FORCE

test/libcrux-%.llbc: .FORCE
	@# Use our committed `Cargo.lock` by default.
	cp libcrux-Cargo.lock $(LIBCRUX_HOME)/Cargo.lock
	RUSTFLAGS="-Cdebug-assertions=no --cfg eurydice" $(CHARON) cargo --preset eurydice \
	  --include 'libcrux_sha3' \
	  --include 'libcrux_secrets' \
	  --include=core::option::* \
	  --rustc-arg='-Aunused' \
	  --start-from libcrux_$(subst -,_,$*) --start-from libcrux_sha3 \
	  --include 'core::num::*::BITS' --include 'core::num::*::MAX' \
	  --dest-file $$PWD/$@ -- \
	  --manifest-path $(LIBCRUX_HOME)/libcrux-$*/Cargo.toml \
	  --target=x86_64-apple-darwin
	@# Commit the `Cargo.lock` so that the nix CI can use it
	cp $(LIBCRUX_HOME)/Cargo.lock libcrux-Cargo.lock

.PRECIOUS: out/%
out/%:
	mkdir -p $@

.PHONY: check-dependencies
check-dependencies: check-karamel check-charon check-libcrux
# % can be "charon", "karamel" or "libcrux".
.PHONY: check-%
check-%:
	@bash ./scripts/check-dependency.sh "$*"
.PHONY: setup-%
setup-%:
	bash ./scripts/check-dependency.sh "$*" --force

.PHONY: nix-magic
nix-magic:
	nix flake update karamel charon libcrux --extra-experimental-features nix-command --extra-experimental-features flakes

nix-update-%:
	PROJECT_REMOTE=$(shell cd $* && git config --get remote.origin.url | cut -d ':' -f 2 | sed s/.git//g); \
	PROJECT_REV=$(shell cd $* && git rev-parse head); \
	nix flake update $* --override-input $* "github:$$PROJECT_REMOTE/$$PROJECT_REV"

# Updates `flake.lock` with the latest commit from our local charon clone (the one that is symlinked into `lib/charon`).
.PHONY: update-charon-pin
update-charon-pin:
	nix-shell -p jq --run ./scripts/update-charon-pin.sh

FORMAT_FILE=include/eurydice_glue.h

.PHONY: format-check
format-check:
	FORMAT_FILE=$(FORMAT_FILE) ./scripts/format.sh check

.PHONY: format-apply
format-apply:
	FORMAT_FILE=$(FORMAT_FILE) ./scripts/format.sh apply

.PHONY: clean-llbc
clean-llbc:
	rm test/*.llbc || true

debug-ppx-%: lib/%
	dune describe pp $<


================================================
FILE: README.md
================================================
<p><div style="text-align: center">
<img src="static/poussin.jpg"
     alt="Orphée et Eurydice" title="Orphée et Eurydice"
     style=""/>
<figcaption>
Nicolas Poussin, <i>Orphée et Eurydice</i>.
Musée du Louvre.
<a href="https://commons.wikimedia.org/wiki/File:Orph%C3%A9e_et_Eurydice_-_Nicolas_Poussin_-_Mus%C3%A9e_du_Louvre_Peintures_INV_7307.jpg">Source</a>
</figcaption>
</div></p>

# Eurydice

Eurydice is a compiler from Rust to C. The purpose of Eurydice is to provide a
backwards-compatibility story as the verification ecosystem gradually
transitions to Rust. New programs can be written in Rust, in turn making them
safer and easier to verify; but for legacy environments that cannot yet take a
dependency on the Rust toolchain, Eurydice allows generating C code as a stopgap
measure.

## Guarantee

Eurydice's informal guarantee is: if the Rust program terminates without
panicking, then the Eurydice-compiled C code computes the same result without
undefined behavior. If the Rust program panics (e.g., on signed integer
overflow, out-of-bounds array access), no guarantees are made about the behavior
of the generated C code.

Currently (late 2023), the flagship example for Eurydice is Kyber, a
Post-Quantum cryptographic algorithm authored and
verified in Rust for the general public, and [compiled to C via
Eurydice](https://github.com/cryspen/hacl-packages/tree/7a7bfbb17d1d912bdb1a80e86a917e1eec8b6264/libcrux/src)
for Mozilla's NSS library.

In terms of software architecture, Eurydice consumes Rust programs via the
[Charon](https://github.com/AeneasVerif/charon) infrastructure, then extracts
Rust to [KaRaMeL](https://github.com/FStarLang/karamel)'s internal AST via a
type-driven translation. Once in the KaRaMeL AST, 30+ nano-passes allow going
from Rust down to C code. About half of these passes were already implemented
for KaRaMeL, the rest of the passes reuse the KaRaMeL infrastructure but were
freshly written for Eurydice.

If you want to contribute or ask questions, we strongly encourage you to join
the [Zulip](https://aeneas-verif.zulipchat.com/).

# Install

We recommend using Nix to easily ensure you are running the right versions of the tools and
libraries. With nix, you can run:
```bash
$ nix run 'github:aeneasverif/eurydice#charon' -- [CHARON_OPTIONS]
$ nix run 'github:aeneasverif/eurydice' -- [EURYDICE_OPTIONS] <llbc_file>
```

Alternatively, you can do a local setup as follows.

```bash
# Step 1: install OCaml environment. Follow instructions, reload your shell, and make sure 
# `eval $(opam env)` has been suitably added to your shell profile.
sudo apt install opam cargo # or brew on OSX
opam init

# Step 2: clone eurydice
git clone https://github.com/AeneasVerif/eurydice
cd eurydice

# Step 3: install dependent projects
# This will clone karamel, charon and libcrux. If you intend to also develop on one of these
# projects, you can symlink your working copy (e.g. `ln -s ../my-charon charon`) instead.
# Note: the invocation for karamel might fail, in which case you want to install all the packages
# in the `depends` field of karamel.opam except fstar. At the time of writing, this means typing:
# opam install ocamlfind batteries zarith stdint yojson ocamlbuild fileutils menhir pprint ulex process fix visitors wasm ppx_deriving ppx_deriving_yojson uucp
make setup-karamel
make setup-charon
make setup-libcrux

# Step 4: ready!
make test
```

# Submitting a successful PR

The C output of the test suite is under version control, and your PR will fail CI if running `make
test` generates a diff for the C files in `out/`. The reason for this is that we need to assess the
impact of a PR on the shape of the generated C code. To make sure the output of the tests is
up-to-date, you can run `make -B test` to force regeneration of the C files.

Our CI will also check that your OCaml and C files have proper formatting -- the target `make
format-apply` reformats your source code to conform to our style guide. It might sometimes be
difficult to have the exact right versions of ocamlformat and clang-format -- in case your PR still
fails, we recommend running `nix develop` followed by `make format-apply`.


================================================
FILE: bin/dune
================================================
(executable
 (public_name eurydice)
 (name main)
 (libraries eurydice terminal))

(env
 (_
  (flags
   (:standard -w @1-2@3-7@8..12@14..21@23..29-30@31..38-39-40-41@43@57))))


================================================
FILE: bin/main.ml
================================================
let () =
  let usage =
    Printf.sprintf
      {|Eurydice: from Rust to C

Usage: %s [OPTIONS] FILES

FILES are .llbc files produced by Charon. Eurydice will generate one C file per
llbc file.

Supported options:|}
      Sys.argv.(0)
  in
  let module O = Eurydice.Options in
  let debug s =
    Krml.Options.debug_modules := Krml.KString.split_on_char ',' s @ !Krml.Options.debug_modules;
    if List.mem "backtrace" !Krml.Options.debug_modules then
      Krml.Options.backtrace := true
  in
  let funroll_loops = ref 16 in
  let spec =
    [
      "--log", Arg.Set_string O.log_level, " log level, use * for everything";
      "--debug", Arg.String debug, " debug options, to be passed to krml";
      "--output", Arg.Set_string Krml.Options.tmpdir, " output directory in which to write files";
      ( "--header",
        Arg.Set_string Krml.Options.header,
        " path to a header file to be prepended to the generated C" );
      "--config", Arg.Set_string O.config, " YAML configuration file";
      ( "--keep-going",
        Arg.Set O.keep_going,
        " keep going even though extracting some definitions might fail" );
      "--no-const", Arg.Set O.no_const, " do not introduce the const keyword for pointers";
      "-fcomments", Arg.Set O.comments, " keep inline comments";
      "-funroll-loops", Arg.Set_int funroll_loops, " unrool loops up to N";
      ( "-fc++17-compat",
        Arg.Set Krml.Options.cxx17_compat,
        " instead of generating C11/C++20 code (default), generate C++17-only code" );
    ]
  in
  let spec = Arg.align spec in
  let files = ref [] in
  let fatal_error =
    Printf.ksprintf (fun s ->
        print_endline s;
        exit 255)
  in
  let anon_fun f =
    if Filename.check_suffix f ".llbc" then
      files := f :: !files
    else
      fatal_error "Unknown file extension for %s" f
  in
  begin
    try Arg.parse spec anon_fun usage
    with e ->
      Printf.printf "Error parsing command-line: %s\n%s\n" (Printexc.get_backtrace ())
        (Printexc.to_string e);
      fatal_error "Incorrect invocation, was: %s\n" (String.concat "␣" (Array.to_list Sys.argv))
  end;

  if !files = [] then
    fatal_error "%s" (Arg.usage_string spec usage);

  let terminal_width =
    Terminal.Size.(
      match get_dimensions () with
      | Some d -> d.columns
      | None -> 80)
  in
  let pfiles b files =
    PPrint.(ToBuffer.pretty 0.95 terminal_width b (Krml.PrintAst.print_files files ^^ hardline))
  in
  let fail file line =
    Printf.printf "%s:%d exiting\n" file line;
    exit 1
  in

  (* This is where the action happens *)
  Eurydice.Logging.enable_logging !O.log_level;
  (* Type applications are compiled as a regular external type. *)
  Krml.(
    Options.(
      allow_tapps := true;
      minimal := true;
      curly_braces := true;
      add_very_early_include := [ All, "\"eurydice_glue.h\"" ];
      parentheses := true;
      no_shadow := true;
      extern_c := true;
      cxx_compat := true;
      unroll_loops := !funroll_loops;
      static_header :=
        [
          Bundle.Prefix [ "core"; "convert" ];
          Bundle.Prefix [ "core"; "num" ];
          Bundle.Prefix [ "Eurydice"; "Int128" ];
        ];
      Warn.parse_warn_error (!warn_error ^ "+8"));
    Monomorphization.NameGen.short_names := true;
    Monomorphization.NameGen.distinguished := Eurydice.Cleanup3.distinguished_names;
    AstToCStar.no_return_type_lids :=
      [
        [ "Eurydice" ], "slice_index_shared";
        [ "Eurydice" ], "slice_index_mut";
        [ "Eurydice" ], "slice_len";
        [ "Eurydice" ], "slice_copy";
        [ "Eurydice" ], "array_eq";
      ]);

  (* Some logic for more precisely tracking readonly functions, so as to remove
     excessive uu__ variables. *)
  let readonly_lids = Hashtbl.create 41 in
  let readonly_map = Hashtbl.create 41 in
  let fill_readonly_table files =
    List.iter
      (fun (_, decls) ->
        List.iter
          (function
            | Krml.Ast.DFunction (_, _, _, _, _, name, _, body) ->
                Hashtbl.add readonly_map name body
            | _ -> ())
          decls)
      files
  in

  Krml.(
    Helpers.is_readonly_builtin_lid_ :=
      let is_readonly_pure_lid_ = !Helpers.is_readonly_builtin_lid_ in
      fun lid t ->
        let ret_t, _ = Helpers.flatten_arrow t in
        is_readonly_pure_lid_ lid t
        || (match lid with
           | "libcrux_intrinsics" :: _, _ -> ret_t <> TUnit
           | [ "Eurydice" ], "vec_len"
           | [ "Eurydice" ], "vec_index"
           | [ "Eurydice" ], "slice_index_shared"
           | [ "Eurydice" ], "slice_index_mut"
           | [ "Eurydice" ], "slice_len"
           | [ "Eurydice" ], "slice_to_ref_array"
           | [ "Eurydice" ], "slice_to_ref_array2"
           | [ "Eurydice" ], "slice_subslice_shared"
           | [ "Eurydice" ], "slice_subslice_mut"
           | [ "Eurydice" ], "slice_subslice_to_shared"
           | [ "Eurydice" ], "slice_subslice_to_mut"
           | [ "Eurydice" ], "slice_subslice_from_shared"
           | [ "Eurydice" ], "slice_subslice_from_mut"
           | [ "Eurydice" ], "array_to_slice_shared"
           | [ "Eurydice" ], "array_to_slice_mut"
           | [ "Eurydice" ], "array_to_subslice_shared"
           | [ "Eurydice" ], "array_to_subslice_mut"
           | [ "Eurydice" ], "array_repeat"
           | [ "core"; "mem" ], "size_of"
           | "core" :: "slice" :: _, "as_mut_ptr"
           | "core" :: "num" :: _, ("rotate_left" | "from_le_bytes" | "wrapping_add") -> true
           | _ -> false)
        || Hashtbl.mem readonly_lids lid
        ||
        match Hashtbl.find_opt readonly_map lid with
        | Some body ->
            let ro = Helpers.is_readonly_c_expression body in
            if ro then
              Hashtbl.add readonly_lids lid ();
            ro
        | _ -> false);

  let files =
    Eurydice.Builtin.files
    @ [
        Eurydice.PreCleanup.merge
          (List.map
             (fun filename ->
               let llbc = Eurydice.LoadLlbc.load_file filename in
               Eurydice.AstOfLlbc.file_of_crate llbc)
             !files);
      ]
  in

  if !O.no_const then
    Printf.printf "⚠️  Not using 'const' for pointer types\n";
  Printf.printf "1️⃣ LLBC ➡️  AST\n";
  Eurydice.Logging.log "Phase0" "%a" pfiles files;
  let files = Eurydice.PreCleanup.precleanup files in

  Eurydice.Logging.log "Phase1" "%a" pfiles files;
  let errors, files = Krml.Checker.check_everything ~warn:true files in
  if errors then
    fail __FILE__ __LINE__;

  Printf.printf "2️⃣ Cleanup\n";
  let config =
    if !O.config = "" then
      None
    else
      Some (Eurydice.Bundles.parse_config (Eurydice.Bundles.load_config !O.config))
  in
  let files =
    match config with
    | None -> files
    | Some config ->
        let files = Eurydice.Bundles.bundle files config in
        let files = Eurydice.Bundles.libraries files in
        let files = Krml.Bundles.topological_sort files in
        Krml.KPrint.bprintf "File order after topological sort: %s\n"
          (String.concat ", " (List.map fst files));
        files
  in
  let files = Eurydice.Cleanup1.cleanup files in
  let files = Eurydice.Cleanup2.rewrite_signed_shifts files in

  Eurydice.Logging.log "Phase2" "%a" pfiles files;
  let errors, files = Krml.Checker.check_everything ~warn:true files in
  if errors then
    fail __FILE__ __LINE__;

  Printf.printf "3️⃣ Monomorphization, datatypes\n";
  let files = Eurydice.Cleanup2.cosmetic#visit_files () files in
  let files = Eurydice.Cleanup2.resugar_loops#visit_files () files in
  let files = Eurydice.Cleanup1.remove_terminal_returns#visit_files true files in
  let files = Eurydice.Cleanup1.remove_terminal_continues#visit_files false files in
  Eurydice.Logging.log "Phase2.1" "%a" pfiles files;
  (* Sanity check for the big rewriting above. *)
  let errors, files = Krml.Checker.check_everything ~warn:true files in
  if errors then
    fail __FILE__ __LINE__;
  Eurydice.Logging.log "Phase2.11" "%a" pfiles files;
  let files = Eurydice.Cleanup2.improve_names files in
  let files = Eurydice.Cleanup2.recognize_asserts#visit_files () files in
  (* Temporary workaround until Aeneas supports nested loops *)
  let files = Eurydice.Cleanup2.inline_loops#visit_files () files in
  (* Following the krml order of phases here *)
  let files = Krml.Inlining.inline_type_abbrevs files in
  let files = Krml.Monomorphization.functions files in
  Eurydice.Logging.log "Phase2.12" "%a" pfiles files;
  let files = Krml.Simplify.optimize_lets files in
  let files = Krml.DataTypes.simplify files in
  (* Must happen now, before Monomorphization.datatypes, because otherwise
     MonomorphizationState.state gets filled with lids that later on get eliminated on the basis
     that they were empty structs to begin with, which would send Checker off the rails *)
  let files = Krml.DataTypes.remove_empty_structs files in
  let files = Krml.Monomorphization.datatypes files in
  (* Cannot use remove_unit_buffers as it is technically incorrect *)
  let tbl = Hashtbl.create 41 in
  let files = (Krml.DataTypes.build_unit_field_table tbl)#visit_files () files in
  let files = (Krml.DataTypes.remove_unit_fields tbl)#visit_files () files in
  Eurydice.Logging.log "Phase2.13" "%a" pfiles files;
  let files = Krml.Inlining.inline files in
  let files =
    match config with
    | None -> files
    | Some config -> (
        let files = Eurydice.Bundles.reassign_monomorphizations files config in
        Eurydice.Logging.log "Phase2.15" "%a" pfiles files;
        try
          let files = Krml.Bundles.topological_sort files in
          files
        with e ->
          flush stdout;
          flush stderr;
          Krml.KPrint.bprintf "Error trying to topologically sort files:\n%s\n\n"
            (Printexc.to_string e);
          Krml.KPrint.bprintf "Consider passing --log Reassign to Eurydice\n";
          Krml.KPrint.bprintf "Internal AST before the error:\n%a\n" pfiles files;
          fail __FILE__ __LINE__)
  in
  Eurydice.Logging.log "Phase2.2" "%a" pfiles files;
  (* Sanity check for the big rewriting above. *)
  let errors, files = Krml.Checker.check_everything ~warn:true files in
  if errors then
    fail __FILE__ __LINE__;
  let files = Krml.Inlining.drop_unused files in
  let files = Eurydice.Cleanup2.remove_array_temporaries#visit_files () files in
  Eurydice.Logging.log "Phase2.25" "%a" pfiles files;
  let files = Eurydice.Cleanup2.remove_array_repeats#visit_files false files in
  Eurydice.Logging.log "Phase2.26" "%a" pfiles files;
  let ((map, _, _) as map3), files = Krml.DataTypes.everything files in
  Eurydice.Cleanup2.fixup_monomorphization_map map;
  let files = Eurydice.Cleanup2.remove_discriminant_reads map3 files in
  Eurydice.Logging.log "Phase2.3" "%a" pfiles files;
  let files = Eurydice.Cleanup2.remove_trivial_ite#visit_files () files in
  Eurydice.Logging.log "Phase2.4" "%a" pfiles files;
  let files = Eurydice.Cleanup2.remove_trivial_into#visit_files () files in
  Eurydice.Logging.log "Phase2.5" "%a" pfiles files;
  let files = Eurydice.Cleanup2.remove_literals files in
  (* Eurydice does something more involved than krml and performs a conservative
     approximation of functions that are known to be pure readonly (i.e.,
     functions that do not write to memory). *)
  fill_readonly_table files;
  let files = Krml.Simplify.optimize_lets files in
  Eurydice.Logging.log "Phase2.55" "%a" pfiles files;
  let files = Eurydice.Cleanup2.remove_array_from_fn files in
  Eurydice.Logging.log "Phase2.6" "%a" pfiles files;
  (* remove_array_from_fn, above, creates further opportunities for removing unused functions. *)
  let files = Krml.Inlining.drop_unused files in
  let files = Eurydice.Cleanup2.remove_implicit_array_copies#visit_files () files in
  (* Creates opportunities for removing unused variables *)
  let files = Eurydice.Cleanup2.remove_assign_return#visit_files () files in
  (* These two need to come before... *)
  let files = Krml.Inlining.cross_call_analysis files in
  let files = Krml.Simplify.remove_unused files in
  Eurydice.Logging.log "Phase2.7" "%a" pfiles files;
  (* This chunk which reuses key elements of simplify2 *)
  let files = Eurydice.Cleanup2.check_addrof#visit_files () files in
  let files = Krml.Simplify.sequence_to_let#visit_files () files in
  let files = Eurydice.Cleanup2.hoist#visit_files [] files in
  let files = Eurydice.Cleanup2.fixup_hoist#visit_files () files in
  Eurydice.Logging.log "Phase2.75" "%a" pfiles files;
  let files = Eurydice.Cleanup2.globalize_global_locals files in
  Eurydice.Logging.log "Phase2.8" "%a" pfiles files;
  let files = Eurydice.Cleanup2.reconstruct_for_loops#visit_files () files in
  let files = Krml.Simplify.misc_cosmetic#visit_files () files in
  let files = Krml.Simplify.let_to_sequence#visit_files () files in
  Eurydice.Logging.log "Phase2.9" "%a" pfiles files;
  let files = Eurydice.Cleanup2.float_comments files in
  Eurydice.Logging.log "Phase2.95" "%a" pfiles files;
  let files = Eurydice.Cleanup2.bonus_cleanups#visit_files [] files in
  (* Macros stemming from globals -- FIXME why is this not Krml.AstToCStar.mk_macros_set? *)
  let files, macros = Eurydice.Cleanup2.build_macros files in

  Eurydice.Logging.log "Phase3" "%a" pfiles files;
  (* debug "checker"; *)
  let errors, files = Krml.Checker.check_everything ~warn:true files in
  if errors then
    fail __FILE__ __LINE__;

  let scope_env = Krml.Simplify.allocate_c_env files in
  Eurydice.Cleanup3.(also_skip_prefix_for_external_types scope_env)#visit_files () files;
  let files = Eurydice.Cleanup3.decay_cg_externals#visit_files (scope_env, false) files in
  let files = Eurydice.Cleanup3.remove_builtin_decls files in
  Eurydice.Logging.log "Phase3.1" "%a" pfiles files;
  let c_name_map = Krml.GlobalNames.mapping (fst scope_env) in

  let open Krml in
  let file_of_map = Bundle.mk_file_of files in
  let deps = Bundles.direct_dependencies_with_internal files file_of_map in
  let files =
    List.map
      (fun (f, ds) ->
        let is_fine = function
          | [ "LowStar"; "Ignore" ], "ignore" | "Eurydice" :: _, _ ->
              (* | "core" :: _, _ -> *)
              true
          | _ -> false
        in
        ( f,
          List.filter_map
            (fun d ->
              match d with
              | Krml.Ast.DExternal (_, _, _, _, lid, t, _)
                when Krml.Monomorphization.(
                       (has_variables [ t ] || has_cg_array [ t ]) && not (is_fine lid)) ->
                  KPrint.bprintf
                    "Warning: %a is a type/const-polymorphic assumed function, must be implemented \
                     with a macro, dropping it\n"
                    Krml.PrintAst.Ops.plid lid;
                  None
              | _ -> Some d)
            ds ))
      files
  in
  Eurydice.Logging.log "Phase3.2" "%a" pfiles files;

  (* The following phase reads the "target" parameter for each file, if any, from the config
     and if set, then it adds the attribute `KRML_ATTRIBUTE_TARGET(target)` to each function
     in the generated C file. This is used, in particular, to mark certain functions as only
     to be compiled on target architectures like `avx2` *)
  let files =
    List.map
      (fun (f, ds) ->
        let open Eurydice.Bundles in
        let target_attribute =
          match config with
          | None -> ""
          | Some c -> (
              match List.find_opt (fun (x : file) -> x.name = f) c with
              | None -> ""
              | Some f -> f.target)
        in
        ( f,
          List.filter_map
            (fun d ->
              match d with
              | Krml.Ast.DFunction (cc, fl, x, y, t, l, b, e) when target_attribute <> "" ->
                  Some (Krml.Ast.DFunction (cc, fl @ [ Target target_attribute ], x, y, t, l, b, e))
              | _ -> Some d)
            ds ))
      files
  in

  Eurydice.Logging.log "Phase3.3" "%a" pfiles files;
  let files =
    List.map
      (fun (f, ds) ->
        ( f,
          List.filter
            (fun d -> not (Krml.Idents.LidSet.mem (Krml.Ast.lid_of_decl d) Eurydice.Builtin.skip))
            ds ))
      files
  in
  let files = AstToCStar.mk_files files c_name_map Idents.LidSet.empty macros in

  (* Uncomment to debug C* AST *)
  (* List.iter *)
  (*   (fun (f, p) -> *)
  (*     print_endline f; *)
  (*     print_endline (CStar.show_program p); *)
  (*     print_endline "") *)
  (*   files; *)
  let headers = CStarToC11.mk_headers c_name_map files in
  let deps = CStarToC11.drop_empty_headers deps headers in
  let internal_headers =
    Bundles.StringSet.of_list
      (List.filter_map
         (function
           | name, C11.Internal _ -> Some name
           | _ -> None)
         headers)
  in
  let public_headers =
    Bundles.StringSet.of_list
      (List.filter_map
         (function
           | name, C11.Public _ -> Some name
           | _ -> None)
         headers)
  in
  let files = CStarToC11.mk_files c_name_map files in
  let files = List.filter (fun (_, decls) -> List.length decls > 0) files in
  Krml.Output.maybe_create_internal_dir headers;
  Krml.Driver.fstar := "dummy";
  ignore (Output.write_c files internal_headers deps);
  ignore (Output.write_h headers public_headers deps);

  Printf.printf "✅ Done\n"


================================================
FILE: cremepat/Lex.ml
================================================
open Sedlexing
open Parse

let digit = [%sedlex.regexp? '0' .. '9']
let integer = [%sedlex.regexp? Plus digit]
let low_alpha = [%sedlex.regexp? 'a' .. 'z']
let up_alpha = [%sedlex.regexp? 'A' .. 'Z']
let anyident = [%sedlex.regexp? up_alpha | low_alpha | '_' | '-' | digit]
let lident = [%sedlex.regexp? low_alpha, Star anyident]
let uident = [%sedlex.regexp? up_alpha, Star anyident]
let uvar = [%sedlex.regexp? '?', Star anyident]
let uvarlist = [%sedlex.regexp? '?', Star anyident, '.', '.']
let locate _ tok = tok, Lexing.dummy_pos, Lexing.dummy_pos

let keywords =
  [
    "match", MATCH;
    "true", TRUE;
    "break", BREAK;
    "false", FALSE;
    "while", WHILE;
    "let", LET;
    "abort", ABORT;
  ]

let lines = ref 1
let cur_line = ref 0

let rec token lexbuf =
  match%sedlex lexbuf with
  | integer ->
      let l = Utf8.lexeme lexbuf in
      locate lexbuf (INT (int_of_string l))
  | uident ->
      let l = Utf8.lexeme lexbuf in
      locate lexbuf (UIDENT l)
  | lident ->
      let l = Utf8.lexeme lexbuf in
      begin
        try locate lexbuf (List.assoc l keywords) with Not_found -> locate lexbuf (LIDENT l)
      end
  | uvar ->
      let l = Utf8.lexeme lexbuf in
      let l = String.sub l 1 (String.length l - 1) in
      locate lexbuf (UVAR l)
  | uvarlist ->
      let l = Utf8.lexeme lexbuf in
      let l = String.sub l 1 (String.length l - 3) in
      locate lexbuf (UVARLIST l)
  | "&" -> locate lexbuf AMP
  | ";" -> locate lexbuf SEMI
  | "->" -> locate lexbuf ARROW
  | "," -> locate lexbuf COMMA
  | "=" -> locate lexbuf EQUALS
  | "[#" -> locate lexbuf LBRACKHASH
  | "[" -> locate lexbuf LBRACK
  | "]" -> locate lexbuf RBRACK
  | "<" -> locate lexbuf LANGLE
  | ">" -> locate lexbuf RANGLE
  | "{" -> locate lexbuf LCURLY
  | "}" -> locate lexbuf RCURLY
  | "(#" -> locate lexbuf LPARENHASH
  | "(" -> locate lexbuf LPAREN
  | ")" -> locate lexbuf RPAREN
  (* | "_" -> locate lexbuf UNDERSCORE *)
  | "::" -> locate lexbuf COLONCOLON
  | ":" -> locate lexbuf COLON
  | "\n" ->
      incr lines;
      cur_line := fst (loc lexbuf);
      token lexbuf
  | eof -> locate lexbuf EOF
  | white_space -> token lexbuf
  | any ->
      let l = Utf8.lexeme lexbuf in
      failwith (Printf.sprintf "unhandled token: %s, len=%d" l (String.length l))
  | _ -> assert false


================================================
FILE: cremepat/Parse.mly
================================================
%{
  open ParseTree
%}

%token<int>     INT
%token<string>  UIDENT LIDENT UVAR UVARLIST
%token          EOF COMMA EQUALS LBRACK RBRACK LBRACKHASH LANGLE RANGLE LCURLY RCURLY
%token          COLON COLONCOLON AMP LPAREN RPAREN LPARENHASH SEMI
%token          MATCH TRUE FALSE LET WHILE BREAK ARROW ABORT

%type <expr> expr
%type <path_item> path_item
%type <pat> pat
%type <typ> typ
%start <expr> fragment

%%

(* Identifiers *)

%inline
uident:
| u = UIDENT
  { u }

%inline
lident:
| l = LIDENT
  { l }

%inline
ident:
| s = LIDENT
  { s }
| s = UIDENT
  { s }

(* Paths *)

path_item:
| i = ident
  { Name i }
| p = UVAR
  { if p = "" then Wild else Var p }
| _p = UVARLIST
  { failwith "TODO" }

%inline
path:
| p = iseparated_twoplus_list(COLONCOLON, path_item)
  { p }

(* Helpers *)
%inline iseparated_twoplus_list(separator, X):
  x1 = X; separator; x2 = X
    { [ x1; x2 ] }
| x1 = X; separator; x2 = X; separator; xs = separated_nonempty_list(separator, X)
    { x1 :: x2 :: xs }

%inline
with_vars(X):
| x = UVAR
  { PatternVar (if x = "" then "_" ^ gensym () else x) }
| x = UVARLIST
  { ListPatternVar (if x = "" then "_" ^ gensym () else x) }
| x = X
  { Fixed x }

%inline
fixed(X):
| x = X
  { Fixed x }

(* Types *)

pre_typ:
| t = typ ts = delimited(LANGLE, separated_list(COMMA, typ), RANGLE)
  { TApp (t, ts) }
| p = path
  { TQualified p }

typ:
| t = with_vars(pre_typ)
  { t }

(* Patterns *)

pre_pat:
| u = uident
  { Cons (u, []) }
| u = uident p = delimited(LPAREN, separated_list(COMMA, pat), RPAREN)
  { Cons (u, p) }
| u = uident p = pat
  { Cons (u, [ p ]) }

pat:
| t = with_vars(pre_pat)
  { t }

(* Expressions *)

expr:
| e = fixed(pre_expr)
  { e }
| e = seq_expr
  { e }

pre_expr:
| LET b = lident EQUALS e1 = app_expr SEMI e2 = expr
  { Let (b, e1, e2) }

seq_expr:
| e = fixed(pre_seq_expr)
  { e }
| e = app_expr
  { e }

pre_seq_expr:
| e1 = app_expr SEMI e2 = seq_expr
  { match e2 with Fixed (Sequence e2) -> Sequence (e1 :: e2) | _ -> Sequence [ e1; e2 ] }

app_expr:
| e = fixed(pre_app_expr)
  { e }
| e = index_expr
  { e }

pre_app_expr:
| head = app_expr
  cgs = ioption(delimited(LBRACKHASH, separated_list(COMMA, expr), RBRACK))
  methods = ioption(delimited(LPARENHASH, separated_list(COMMA, expr), RPAREN))
  ts = ioption(delimited(LANGLE, separated_list(COMMA, typ), RANGLE))
  args = delimited(LPAREN, separated_list(COMMA, expr), RPAREN)
  {
    let cgs = Option.value ~default:[] cgs in
    let methods = Option.value ~default:[] methods in
    let ts = Option.value ~default:[] ts in
    App { head; cgs; methods; ts; args }
  }
| AMP e = index_expr
  { Addr e }

index_expr:
| e = fixed(pre_index_expr)
  { e }
| e = atomic_expr
  { e }

pre_index_expr:
| e1 = index_expr e2 = delimited(LBRACK, expr, RBRACK)
  { Index (e1, e2) }

atomic_expr:
| e = with_vars(pre_atomic_expr)
  { e }
| e = delimited(LPAREN, expr, RPAREN)
  { e }

pre_atomic_expr:
| WHILE e1 = index_expr e2 = delimited(LCURLY, expr, RCURLY)
  { While (e1, e2) }
| MATCH e = index_expr bs = delimited(LCURLY, separated_list(COMMA, separated_pair(pat, ARROW, expr)), RCURLY)
  { Match (e, bs) }
| e = delimited(LCURLY, separated_nonempty_list(COMMA, separated_pair(lident, COLON, expr)), RCURLY)
  { Record e }
| i = INT 
  { Int i }
| p = path
  { Qualified p }
| x = lident
  { BoundVar x }
| BREAK
  { Break }
| ABORT
  { Abort }
| FALSE
  { Bool false }
| TRUE
  { Bool true }

(* Entry point *)
fragment:
| e = expr EOF
  { e }



================================================
FILE: cremepat/ParseTree.ml
================================================
(* Strictly a parse tree *)
type pre_expr =
  (* Binding most loosely *)
  | Let of string * expr * expr
  | Sequence of expr list
  | App of { head : expr; cgs : expr list; methods : expr list; ts : typ list; args : expr list }
  | Addr of expr
  | Index of expr * expr
  (* Atomic -- we terminate matches and loops using braces, we are not barbarians. *)
  | While of expr * expr
  | Match of expr * branch list
  | Record of (string * expr) list
  | Int of int
  | Qualified of path
  | BoundVar of string
  | Break
  | Abort
  | Bool of bool

and expr = pre_expr with_vars
and 'a with_vars = PatternVar of string | ListPatternVar of string | Fixed of 'a
and path = path_item list
and path_item = Name of string | Wild | Var of string
and branch = pat * expr
and pre_pat = Cons of string * pat list
and pat = pre_pat with_vars
and pre_typ = TQualified of path | TApp of typ * typ list
and typ = pre_typ with_vars

let gensym =
  let r = ref 0 in
  fun () ->
    incr r;
    "$x" ^ string_of_int !r


================================================
FILE: cremepat/README.md
================================================
CREMEPAT: CREdible, Meta-Extensible PATterns
--------------------------------------------

Write concrete syntax instead of 50 lines of deeply-embedded pattern matches. See lib/Cleanup2.ml


================================================
FILE: cremepat/cremepat.ml
================================================
module Terminal = struct
  let mkcolor x = Printf.sprintf "\x1b[38;5;%dm" x
  let green = mkcolor 119
  let red = mkcolor 203
  let blue = mkcolor 81
  let yellow = mkcolor 227
  let orange = mkcolor 202
  let underline = "\x1b[4m"
  let reset = "\x1b[0m"
end

let fail fmt =
  let b = Buffer.create 256 in
  Printf.kbprintf (fun b -> failwith (Buffer.contents b)) b fmt

let parse arg =
  let the_parser = MenhirLib.Convert.Simplified.traditional2revised Parse.fragment in
  let lexbuf = Sedlexing.Utf8.from_string arg in
  try the_parser (fun _ -> Lex.token lexbuf) with
  | (Sedlexing.MalFormed | Sedlexing.InvalidCodepoint _) as e ->
      Printf.eprintf "Lexing error in: %s\n" arg;
      raise e
  | Parse.Error as e ->
      let start, end_ = Sedlexing.loc lexbuf in
      let start = start - !Lex.cur_line in
      let end_ = end_ - !Lex.cur_line in
      let buf = Buffer.create 256 in
      List.iteri
        (fun i line ->
          Buffer.add_string buf line;
          Buffer.add_char buf '\n';
          if i + 1 = !Lex.lines then begin
            Buffer.add_string buf Terminal.red;
            for _j = 0 to start do
              Buffer.add_char buf ' '
            done;
            for _j = start to end_ - 1 do
              Buffer.add_char buf '^'
            done;
            Buffer.add_string buf Terminal.reset;
            Buffer.add_char buf '\n'
          end)
        (String.split_on_char '\n' arg);
      Printf.eprintf "Parse error, line %d, characters %d-%d: %s\n" !Lex.lines start end_
        (Buffer.contents buf);
      raise e

open Ppxlib

(* Environments for the compile-time compilation of parse trees to OCaml pattern ASTs *)

type env = string list

let empty = []
let push env x = x :: env

let find env x =
  let exception Found of int in
  try
    List.iteri
      (fun i x' ->
        if x = x' then
          raise (Found i))
      env;
    raise Not_found
  with Found i -> i

(* Helpers to build nodes *)

let lident ~loc x = { txt = Lident x; loc }

let rec ppat_list ~loc pats =
  let open Ast_builder.Default in
  List.fold_right
    (fun pat acc -> ppat_construct ~loc (lident ~loc "::") (Some (ppat_tuple ~loc [ pat; acc ])))
    pats
    (ppat_construct ~loc (lident ~loc "[]") None)

(* Variants for things that are not expressions (i.e. not 'a nodes) *)

let ppat_cons_many' ~loc cons args =
  let open Ast_builder.Default in
  ppat_construct ~loc (lident ~loc cons) (Some (ppat_tuple ~loc args))

let ppat_cons_one' ~loc cons arg =
  let open Ast_builder.Default in
  ppat_construct ~loc (lident ~loc cons) (Some arg)

let ppat_cons_zero' ~loc cons =
  let open Ast_builder.Default in
  ppat_construct ~loc (lident ~loc cons) None

let ppat_string ~loc s =
  let open Ast_builder.Default in
  ppat_constant ~loc (Pconst_string (s, loc, None))

let ppat_int ~loc s =
  let open Ast_builder.Default in
  ppat_constant ~loc (Pconst_integer (string_of_int s, None))

let ppat_bool ~loc s = ppat_cons_zero' ~loc (string_of_bool s)

(* Variants that produce the { node = ...; _ } part automatically *)

let ppat_node ~loc pat =
  let open Ast_builder.Default in
  ppat_record ~loc [ lident ~loc "node", pat ] Open

let ppat_cons_many ~loc cons args = ppat_node ~loc (ppat_cons_many' ~loc cons args)
let ppat_cons_one ~loc cons arg = ppat_node ~loc (ppat_cons_one' ~loc cons arg)
let ppat_cons_zero ~loc cons = ppat_node ~loc (ppat_cons_zero' ~loc cons)

let compile_parse_tree (env : env) loc
    (pt : ParseTree.expr) (* : Astlib.Ast_503.Parsetree.pattern *) =
  let open Ast_builder.Default in
  (* Helpers *)

  (* Compiling a node where only non-list unification variables may appear *)
  let rec compile_with_var : 'a. env -> 'a ParseTree.with_vars -> (env -> 'a -> _) -> _ =
   fun env pt compile_pre ->
    match pt with
    | Fixed e -> compile_pre env e
    | PatternVar txt -> ppat_var ~loc { txt; loc }
    | ListPatternVar s -> fail "[cremepat]: list pattern ?%s.. appears in unexpected position" s
  (* Special treatment for lists of 'a that are allowed to contain list unification variables --
     recurse into one of the specialized variants of this for AST positions that admit lists. Note
     that the syntax does not enforce that list unification variables only appear where allowed --
     there is some implicit typing depending on whether you recurse via compile_with_var or
     compile_list_pattern. *)
  and compile_list_pattern : 'a. env -> 'a ParseTree.with_vars list -> (env -> 'a -> _) -> _ =
   fun env pts compile_pre ->
    match pts with
    | [] -> ppat_construct ~loc (lident ~loc "[]") None
    | ListPatternVar txt :: [] -> ppat_var ~loc { txt; loc }
    | ListPatternVar s :: _ ->
        fail "[cremepat]: list pattern ?%s.. should only appear in tail position" s
    | PatternVar txt :: pts ->
        ppat_construct ~loc (lident ~loc "::")
          (Some
             (ppat_tuple ~loc
                [ ppat_var ~loc { txt; loc }; compile_list_pattern env pts compile_pre ]))
    | Fixed pt :: pts ->
        ppat_construct ~loc (lident ~loc "::")
          (Some (ppat_tuple ~loc [ compile_pre env pt; compile_list_pattern env pts compile_pre ]))
  and compile env pt = compile_with_var env pt compile_pre_expr
  and compile_expr_list_pattern env pt = compile_list_pattern env pt compile_pre_expr
  and compile_pre_expr env pt =
    match pt with
    | ParseTree.Let (b, e1, e2) ->
        let p1 = compile env e1 in
        let env = push env b in
        let p2 = compile env e2 in
        (* ELet (_, p1, p2) *)
        ppat_cons_many ~loc "ELet" [ ppat_any ~loc; p1; p2 ]
    | Sequence ps -> ppat_cons_one ~loc "ESequence" (compile_expr_list_pattern env ps)
    | App { head; cgs; methods; ts; args } ->
        (* EApp (ETApp (e, ts), es) *)
        ppat_cons_many ~loc "EApp"
          [
            ppat_cons_many ~loc "ETApp"
              [
                compile env head;
                compile_expr_list_pattern env cgs;
                compile_expr_list_pattern env methods;
                compile_typ_list_pattern env ts;
              ];
            ppat_list ~loc (List.map (compile env) args);
          ]
    | Addr e -> ppat_cons_one ~loc "EAddrOf" (compile env e)
    | Index (e1, e2) ->
        let p1 = compile env e1 in
        let p2 = compile env e2 in
        ppat_cons_many ~loc "EBufRead" [ p1; p2 ]
    | While (e1, e2) ->
        let p1 = compile env e1 in
        let p2 = compile env e2 in
        ppat_cons_many ~loc "EWhile" [ p1; p2 ]
    | Match (e, bs) ->
        let e = compile env e in
        ppat_cons_many ~loc "EMatch"
          [
            ppat_any ~loc;
            (* no syntax to match on match flavor *)
            e;
            ppat_list ~loc
              (List.map
                 (fun (p, e) ->
                   let p = compile_pat env p in
                   let e = compile env e in
                   ppat_tuple ~loc
                     [ ppat_any ~loc; (* no syntax to match on binders in patterns *) p; e ])
                 bs);
          ]
    | Record es ->
        ppat_cons_one ~loc "EFlat"
          (ppat_list ~loc
             (List.map
                (fun (f, e) ->
                  ppat_tuple ~loc [ ppat_cons_one' ~loc "Some" (ppat_string ~loc f); compile env e ])
                es))
    | Int i ->
        ppat_cons_many ~loc "EConstant"
          [
            ppat_any ~loc;
            (* no syntax to match on width of constants *)
            ppat_string ~loc (string_of_int i);
          ]
    | Qualified path -> ppat_cons_one ~loc "EQualified" (compile_path env path)
    | BoundVar s ->
        let i = find env s in
        ppat_cons_one ~loc "EBound" (ppat_int ~loc i)
    | Break -> ppat_cons_zero ~loc "EBreak"
    | Bool b -> ppat_cons_one ~loc "EBool" (ppat_bool ~loc b)
    | Abort -> ppat_cons_many ~loc "EAbort" [ ppat_any ~loc; ppat_any ~loc ]
  (* Paths *)
  and compile_path env (pt : ParseTree.path) =
    let m, n =
      match List.rev pt with
      | n :: m -> List.rev m, n
      | _ -> failwith "impossible"
    in
    ppat_tuple ~loc [ ppat_list ~loc (List.map (compile_path_item env) m); compile_path_item env n ]
  and compile_path_item _env (pt : ParseTree.path_item) =
    match pt with
    | Wild -> ppat_any ~loc
    | Name s -> ppat_string ~loc s
    | Var txt -> ppat_var ~loc { txt; loc }
  (* Types *)
  and _compile_typ env pt = compile_with_var env pt compile_pre_typ
  and compile_typ_list_pattern env (es : ParseTree.typ list) =
    compile_list_pattern env es compile_pre_typ
  and compile_pre_typ env (pt : ParseTree.pre_typ) =
    match pt with
    | TQualified path -> ppat_cons_one' ~loc "TQualified" (compile_path env path)
    | TApp (Fixed (TQualified p), ts) ->
        ppat_cons_many' ~loc "TApp" [ compile_path env p; compile_typ_list_pattern env ts ]
    | TApp (PatternVar p, ts) ->
        ppat_cons_many' ~loc "TApp"
          [ ppat_var ~loc { txt = p; loc }; compile_typ_list_pattern env ts ]
    | TApp (_, _) -> failwith "incorrect type application left-hand side"
  (* Patterns *)
  and compile_pat env pt = compile_with_var env pt compile_pre_pat
  and compile_pat_list_pattern env (es : ParseTree.pat list) =
    compile_list_pattern env es compile_pre_pat
  and compile_pre_pat env (pt : ParseTree.pre_pat) =
    match pt with
    | Cons (cons, ps) ->
        ppat_cons_many ~loc "PCons" [ ppat_string ~loc cons; compile_pat_list_pattern env ps ]
  in

  compile env pt

let expand ~ctxt (payload : string) =
  let pt = parse payload in
  let loc = Expansion_context.Extension.extension_point_loc ctxt in
  compile_parse_tree empty loc pt

let my_extension =
  Extension.V3.declare "cremepat" Pattern Ast_pattern.(single_expr_payload (estring __)) expand

let rule = Ppxlib.Context_free.Rule.extension my_extension
let () = Driver.register_transformation ~rules:[ rule ] "cremepat"


================================================
FILE: cremepat/dune
================================================
(library
 (name cremepat)
 (kind ppx_rewriter)
 (libraries ppxlib menhirLib)
 (preprocess
  (pps sedlex.ppx))
 (flags
  (:standard
   -warn-error
   -A
   -w
   @1-2@3-7@8..12@14..21@23..29-30@31..38-39-40-41@43@57)))

(menhir
 (modules Parse))

; (flags --trace))


================================================
FILE: dune
================================================
(data_only_dirs charon karamel libcrux)


================================================
FILE: dune-project
================================================
(lang dune 3.13)

(name eurydice)

(generate_opam_files true)

(source
 (github AeneasVerif/eurydice))

(authors "Son Ho" "Jonathan Protzenko")

(maintainers "Son Ho" "Jonathan Protzenko")

(license Apache-2.0)

(package
 (name eurydice)
 (synopsis "A Rust to C translator")
 (description "Eurydice builds upon Charon to take existing Rust code and
              translate it to C")
 (depends
  ocaml
  dune
  yaml
  (terminal (>= 0.4.0))
 )
)

(using menhir 3.0)


================================================
FILE: eurydice.opam
================================================
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "A Rust to C translator"
description: """
Eurydice builds upon Charon to take existing Rust code and
              translate it to C"""
maintainer: ["Son Ho" "Jonathan Protzenko"]
authors: ["Son Ho" "Jonathan Protzenko"]
license: "Apache-2.0"
homepage: "https://github.com/AeneasVerif/eurydice"
bug-reports: "https://github.com/AeneasVerif/eurydice/issues"
depends: [
  "ocaml"
  "dune" {>= "3.13"}
  "yaml"
  "terminal" {>= "0.4.0"}
  "odoc" {with-doc}
]
build: [
  ["dune" "subst"] {dev}
  [
    "dune"
    "build"
    "-p"
    name
    "-j"
    jobs
    "@install"
    "@runtest" {with-test}
    "@doc" {with-doc}
  ]
]
dev-repo: "git+https://github.com/AeneasVerif/eurydice.git"


================================================
FILE: flake.nix
================================================
{
  inputs = {
    nixpkgs.follows = "charon/nixpkgs";
    flake-utils.follows = "karamel/flake-utils";
    karamel.url = "github:FStarLang/karamel";
    karamel.inputs.nixpkgs.follows = "nixpkgs";

    charon.url = "github:AeneasVerif/charon";
    crane.follows = "charon/crane";

    libcrux.url = "github:cryspen/libcrux";
    googletest.follows = "libcrux/googletest";
    benchmark.follows = "libcrux/benchmark";
    json.follows = "libcrux/json";
  };
  outputs =
    { self
    , flake-utils
    , nixpkgs
    , ...
    } @ inputs:
    flake-utils.lib.eachDefaultSystem (system:
    let
      pkgs = import nixpkgs { inherit system; };

      karamel = inputs.karamel.packages.${system}.default.override {
        ocamlPackages = pkgs.ocamlPackages;
      };
      krml = karamel.passthru.lib;

      charon-packages = inputs.charon.packages.${system};
      charon-ml = charon-packages.charon-ml.override {
        ocamlPackages = pkgs.ocamlPackages;
      };
      charon = charon-packages.default;
      craneLib = (inputs.crane.mkLib pkgs).overrideToolchain charon-packages.rustToolchain;

      package =
        { ocamlPackages
        , removeReferencesTo
        , clangStdenv
        , symlinks
        , version
        , which
        , z3
        , cmake
        , git
        , mold-wrapped
        , ninja
        , gnugrep
        , charon
        , charon-ml
        , krml
        , symlinkJoin
        , clang
        , craneLib
        }:
        let
          eurydice = ocamlPackages.buildDunePackage {
            pname = "eurydice";
            inherit version;

            src = ./.;

            nativeBuildInputs = [ gnugrep ] ++ (with ocamlPackages; [ menhir ]);

            propagatedBuildInputs = [ krml charon-ml ocamlPackages.terminal ocamlPackages.yaml ] ++ (with ocamlPackages; [ menhirLib ]);

            postInstall = ''
              ln -s ${charon}/bin/charon $out/bin/charon
            '';

            passthru = {
              tests = clangStdenv.mkDerivation rec {
                name = "tests";
                src = ./.;
                IN_CI = 1; # Tell the `check-dependency` script to not check for charon/karamel commit hashes.
                KRML_HOME = karamel.src;
                EURYDICE = "${eurydice}/bin/eurydice";
                CHARON = "${charon}/bin/charon";
                CMAKE_FLAGS = [
                  "-DFETCHCONTENT_SOURCE_DIR_GOOGLETEST=${inputs.googletest}"
                  "-DFETCHCONTENT_SOURCE_DIR_BENCHMARK=${inputs.benchmark}"
                  "-DFETCHCONTENT_SOURCE_DIR_JSON=${inputs.json}"
                  "-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
                ];

                # Pre-build the cargo dependencies; required for `cargo` to
                # work inside nix since nix builders don't have network
                # access.
                cargoVendorDir = craneLib.vendorCargoDeps { cargoLock = ./libcrux-Cargo.lock; };
                cargoArtifacts = craneLib.buildDepsOnly {
                  src = inputs.libcrux.sourceInfo.outPath;
                  inherit cargoVendorDir;
                  # Only build the libcrux-ml-kem package.
                  cargoExtraArgs = "-p libcrux-ml-kem";
                  # Run `cargo check` too, to make sure we include the dev-dependencies.
                  doCheck = true;
                };

                nativeBuildInputs = [
                  cmake
                  git
                  mold-wrapped
                  ninja
                  # Crane hooks that will use the
                  # `cargoArtifacts`/`cargoVendorDir` to tell cargo where to
                  # find its dependencies.
                  craneLib.configureCargoCommonVarsHook
                  craneLib.configureCargoVendoredDepsHook
                  craneLib.inheritCargoArtifactsHook
                  pkgs.zstd # For the inheritCargoArtifactsHook hooks.
                ];
                buildInputs = [ eurydice ];

                dontUseCmakeConfigure = true;
                buildPhase = ''
                  # Prepare the libcrux directory.
                  cp --no-preserve=mode,ownership -rf ${inputs.libcrux.sourceInfo.outPath} libcrux
                  # Symlink karamel so we find its headers.
                  ln -s $KRML_HOME karamel

                  # Run the tests
                  make -o all test

                  # Remove generated files that we don't want to compare.
                  shopt -s globstar
                  rm -f out/**/a.out
                  # Check that there are no differences between the generated
                  # outputs and the committed outputs.
                  if diff -rq "${./out}" out; then
                    echo "Ok: the regenerated files are the same as the checked out files"
                  else
                    echo "Error: the regenerated files differ from the checked out files"
                    diff -ru "${./out}" out
                    exit 1
                  fi
                '';
                installPhase = ''touch $out'';
              };
            };
          };
        in
        eurydice;
    in
    rec {
      packages = {
        default = pkgs.callPackage package {
          inherit charon charon-ml krml craneLib;
          version = self.rev or "dirty";
        };
        inherit charon karamel;
      };
      checks = {
        default = packages.default.tests;
        format = pkgs.runCommand "format-check"
          {
            src = ./.;
            nativeBuildInputs = [
              pkgs.bash
              pkgs.gnumake
              pkgs.llvmPackages_18.clang-tools # For clang-format
              pkgs.ocamlPackages.ocaml
              pkgs.ocamlPackages.ocamlformat_0_27_0
              pkgs.ocamlPackages.dune_3
            ];
          } ''
          cp -r $src src
          chmod u+w src
          cd src
          bash ./scripts/format.sh check
          touch $out
        '';
      };
      devShells.ci = pkgs.mkShell { packages = [ pkgs.jq ]; };
      devShells.default = (pkgs.mkShell.override { stdenv = pkgs.clangStdenv; }) {
        OCAMLRUNPARAM = "b"; # Get backtrace on exception
        packages = [
          pkgs.jq
          pkgs.llvmPackages_18.clang-tools # For clang-format
          pkgs.ocamlPackages.ocaml
          pkgs.ocamlPackages.ocamlformat_0_27_0
          pkgs.ocamlPackages.menhir
          # ocaml-lsp's version must match the ocaml version used. Pinning
          # this here to save me a headache.
          pkgs.ocamlPackages.ocaml-lsp
          pkgs.rustup
        ];
        buildInputs = [ charon.buildInputs ];
        nativeBuildInputs = [ charon.nativeBuildInputs pkgs.clang ];

        inputsFrom = [
          packages.default
          packages.default.tests
          charon-ml
        ];
      };
    });
}


================================================
FILE: include/eurydice_glue.h
================================================
#pragma once

#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#ifdef _MSC_VER
// For __popcnt
#include <intrin.h>
#endif

#include "krml/internal/target.h"
#include "krml/lowstar_endianness.h"

// C++ HELPERS

#if defined(__cplusplus)

#ifndef KRML_HOST_EPRINTF
#define KRML_HOST_EPRINTF(...) fprintf(stderr, __VA_ARGS__)
#endif

#include <utility>

#ifndef __cpp_lib_type_identity
template <class T> struct type_identity {
  using type = T;
};

template <class T> using type_identity_t = typename type_identity<T>::type;
#else
using std::type_identity_t;
#endif

#define KRML_UNION_CONSTRUCTOR(T)                                              \
  template <typename V>                                                        \
  constexpr T(int t, V U::*m, type_identity_t<V> v) : tag(t) {                 \
    val.*m = std::move(v);                                                     \
  }                                                                            \
  T() = default;

#endif

// GENERAL-PURPOSE STUFF

#define LowStar_Ignore_ignore(e, t, _ret_t) ((void)e)

#define EURYDICE_ASSERT(test, msg)                                             \
  do {                                                                         \
    if (!(test)) {                                                             \
      fprintf(stderr, "assertion \"%s\" failed: file \"%s\", line %d\n", msg,  \
              __FILE__, __LINE__);                                             \
      exit(255);                                                               \
    }                                                                          \
  } while (0)

// SIZEOF, ALIGNOF

#define Eurydice_sizeof(t) sizeof(t)

#define Eurydice_alignof(t) alignof(t)

// SLICES, ARRAYS, ETC.

// For convenience, we give these common slice types, below, a distinguished
// status and rather than emit them in the client code, we skip their
// code-generation in Cleanup3.ml and write them by hand here. This makes it
// easy to write interop code that brings those definitions in scope.

// &[u8]
typedef struct Eurydice_borrow_slice_u8_s {
  const uint8_t *ptr;
  size_t meta;
} Eurydice_borrow_slice_u8;

// &[u16]
typedef struct Eurydice_borrow_slice_i16_s {
  const int16_t *ptr;
  size_t meta;
} Eurydice_borrow_slice_i16;

// &mut [u8]
typedef struct Eurydice_mut_borrow_slice_u8_s {
  uint8_t *ptr;
  size_t meta;
} Eurydice_mut_borrow_slice_u8;

// &mut [u16]
typedef struct Eurydice_mut_borrow_slice_i16_s {
  int16_t *ptr;
  size_t meta;
} Eurydice_mut_borrow_slice_i16;

#if defined(__cplusplus)
#define KRML_CLITERAL(type) type
#else
#define KRML_CLITERAL(type) (type)
#endif

#if defined(__cplusplus) && defined(__cpp_designated_initializers) ||          \
    !(defined(__cplusplus))
#define EURYDICE_CFIELD(X) X
#else
#define EURYDICE_CFIELD(X)
#endif

#define Eurydice_array_repeat(dst, len, init, t)                               \
  ERROR "should've been desugared"

// Copy a slice with memcopy
#define Eurydice_slice_copy(dst, src, t)                                       \
  memcpy(dst.ptr, src.ptr, dst.meta * sizeof(t))

#define core_array___T__N___as_slice(len_, ptr_, t, ret_t)                     \
  (KRML_CLITERAL(ret_t){EURYDICE_CFIELD(.ptr =)(ptr_)->data,                   \
                        EURYDICE_CFIELD(.meta =) len_})

#define core_array__core__clone__Clone_for__T__N___clone(len, src, elem_type,  \
                                                         _ret_t)               \
  (*(src))
#define TryFromSliceError uint8_t
#define core_array_TryFromSliceError uint8_t

// Distinguished support for some PartialEq trait implementations
//
// core::cmp::PartialEq<@Array<U, N>> for @Array<T, N>
#define Eurydice_array_eq(sz, a1, a2, t)                                       \
  (memcmp((a1)->data, (a2)->data, sz * sizeof(t)) == 0)
// core::cmp::PartialEq<&0 (@Slice<U>)> for @Array<T, N>
#define Eurydice_array_eq_slice_shared(sz, a1, s2, t, _)                       \
  (memcmp((a1)->data, (s2)->ptr, sz * sizeof(t)) == 0)
#define Eurydice_array_eq_slice_mut(sz, a1, s2, t, _)                          \
  Eurydice_array_eq_slice_shared(sz, a1, s2, t, _)

// DEPRECATED -- should no longer be generated
#define core_array_equality__core__cmp__PartialEq__Array_U__N___for__Array_T__N___eq( \
    sz, a1, a2, t, _, _ret_t)                                                         \
  Eurydice_array_eq(sz, a1, a2, t)
#define core_array_equality__core__cmp__PartialEq__0___Slice_U____for__Array_T__N___eq( \
    sz, a1, a2, t, _, _ret_t)                                                           \
  Eurydice_array_eq(sz, a1, ((a2)->ptr), t)
#define core_cmp_impls__core__cmp__PartialEq__0_mut__B___for__1_mut__A___eq(   \
    _m0, _m1, src1, src2, _0, _1, T)                                           \
  Eurydice_slice_eq(src1, src2, _, _, T, _)

#define Eurydice_slice_split_at(slice, mid, element_type, ret_t)               \
  KRML_CLITERAL(ret_t) {                                                       \
    EURYDICE_CFIELD(.fst =){EURYDICE_CFIELD(.ptr =)((slice).ptr),              \
                            EURYDICE_CFIELD(.meta =) mid},                     \
        EURYDICE_CFIELD(.snd =) {                                              \
      EURYDICE_CFIELD(.ptr =)                                                  \
      ((slice).ptr + mid), EURYDICE_CFIELD(.meta =)((slice).meta - mid)        \
    }                                                                          \
  }

#define Eurydice_slice_split_at_mut(slice, mid, element_type, ret_t)           \
  KRML_CLITERAL(ret_t) {                                                       \
    EURYDICE_CFIELD(.fst =){EURYDICE_CFIELD(.ptr =)((slice).ptr),              \
                            EURYDICE_CFIELD(.meta =) mid},                     \
        EURYDICE_CFIELD(.snd =) {                                              \
      EURYDICE_CFIELD(.ptr =)                                                  \
      ((slice).ptr + mid), EURYDICE_CFIELD(.meta =)((slice).meta - mid)        \
    }                                                                          \
  }

// Conversion of slice to an array, rewritten (by Eurydice) to name the
// destination array, since arrays are not values in C.
// N.B.: see note in karamel/lib/Inlining.ml if you change this.

#define Eurydice_slice_to_ref_array2(len_, src, arr_ptr, t_ptr, t_arr, t_err,  \
                                     t_res)                                    \
  (src.meta >= len_                                                            \
       ? ((t_res){.tag = core_result_Ok, .val = {.case_Ok = arr_ptr}})         \
       : ((t_res){.tag = core_result_Err, .val = {.case_Err = 0}}))

// CORE STUFF (conversions, endianness, ...)

// We slap extern "C" on declarations that intend to implement a prototype
// generated by Eurydice, because Eurydice prototypes are always emitted within
// an extern "C" block, UNLESS you use -fcxx17-compat, in which case, you must
// pass -DKRML_CXX17_COMPAT="" to your C++ compiler.
#if defined(__cplusplus) && !defined(KRML_CXX17_COMPAT)
extern "C" {
#endif

#define core_hint_black_box(X, _0, _1) (X)

// [ u8; 2 ]
typedef struct Eurydice_array_u8x2_s {
  uint8_t data[2];
} Eurydice_array_u8x2;

// [ u8; 4 ]
typedef struct Eurydice_array_u8x4_s {
  uint8_t data[4];
} Eurydice_array_u8x4;

// [ u8; 8 ]
typedef struct Eurydice_array_u8x8_s {
  uint8_t data[8];
} Eurydice_array_u8x8;

static inline uint16_t core_num__u16__from_le_bytes(Eurydice_array_u8x2 buf) {
  return load16_le(buf.data);
}

static inline Eurydice_array_u8x4 core_num__u32__to_be_bytes(uint32_t src) {
  // TODO: why not store32_be?
  Eurydice_array_u8x4 a;
  uint32_t x = htobe32(src);
  memcpy(a.data, &x, 4);
  return a;
}

static inline Eurydice_array_u8x4 core_num__u32__to_le_bytes(uint32_t src) {
  Eurydice_array_u8x4 a;
  store32_le(a.data, src);
  return a;
}

static inline uint32_t core_num__u32__from_le_bytes(Eurydice_array_u8x4 buf) {
  return load32_le(buf.data);
}

static inline Eurydice_array_u8x8 core_num__u64__to_le_bytes(uint64_t v) {
  Eurydice_array_u8x8 a;
  store64_le(a.data, v);
  return a;
}

static inline uint64_t core_num__u64__from_le_bytes(Eurydice_array_u8x8 buf) {
  return load64_le(buf.data);
}

static inline int64_t
core_convert_num__core__convert__From_i32__for_i64__from(int32_t x) {
  return x;
}

static inline uint64_t
core_convert_num__core__convert__From_u8__for_u64__from(uint8_t x) {
  return x;
}

static inline uint64_t
core_convert_num__core__convert__From_u16__for_u64__from(uint16_t x) {
  return x;
}

static inline size_t
core_convert_num__core__convert__From_u16__for_usize__from(uint16_t x) {
  return x;
}

static inline uint32_t core_num__u8__count_ones(uint8_t x0) {
#ifdef _MSC_VER
  return __popcnt(x0);
#else
  return __builtin_popcount(x0);
#endif
}

static inline uint32_t core_num__u32__count_ones(uint32_t x0) {
#ifdef _MSC_VER
  return __popcnt(x0);
#else
  return __builtin_popcount(x0);
#endif
}

static inline uint32_t core_num__i32__count_ones(int32_t x0) {
#ifdef _MSC_VER
  return __popcnt(x0);
#else
  return __builtin_popcount(x0);
#endif
}

static inline size_t core_cmp_impls__core__cmp__Ord_for_usize__min(size_t a,
                                                                   size_t b) {
  if (a <= b)
    return a;
  else
    return b;
}

// unsigned overflow wraparound semantics in C
static inline uint8_t core_num__u8__wrapping_sub(uint8_t x, uint8_t y) {
  return x - y;
}
static inline uint8_t core_num__u8__wrapping_add(uint8_t x, uint8_t y) {
  return x + y;
}
static inline uint8_t core_num__u8__wrapping_mul(uint8_t x, uint8_t y) {
  return x * y;
}
static inline uint16_t core_num__u16__wrapping_sub(uint16_t x, uint16_t y) {
  return x - y;
}
static inline uint16_t core_num__u16__wrapping_add(uint16_t x, uint16_t y) {
  return x + y;
}
static inline uint16_t core_num__u16__wrapping_mul(uint16_t x, uint16_t y) {
  return x * y;
}
static inline uint32_t core_num__u32__wrapping_sub(uint32_t x, uint32_t y) {
  return x - y;
}
static inline uint32_t core_num__u32__wrapping_add(uint32_t x, uint32_t y) {
  return x + y;
}
static inline uint32_t core_num__u32__wrapping_mul(uint32_t x, uint32_t y) {
  return x * y;
}
static inline uint64_t core_num__u64__wrapping_sub(uint64_t x, uint64_t y) {
  return x - y;
}
static inline uint64_t core_num__u64__wrapping_add(uint64_t x, uint64_t y) {
  return x + y;
}
static inline uint64_t core_num__u64__wrapping_mul(uint64_t x, uint64_t y) {
  return x * y;
}
static inline size_t core_num__usize__wrapping_sub(size_t x, size_t y) {
  return x - y;
}
static inline size_t core_num__usize__wrapping_add(size_t x, size_t y) {
  return x + y;
}
static inline size_t core_num__usize__wrapping_mul(size_t x, size_t y) {
  return x * y;
}

static inline int8_t core_num__i8__wrapping_add(int8_t x, int8_t y) {
  return (int8_t)((uint8_t)x + (uint8_t)y);
}
static inline int8_t core_num__i8__wrapping_sub(int8_t x, int8_t y) {
  return (int8_t)((uint8_t)x - (uint8_t)y);
}
static inline int8_t core_num__i8__wrapping_mul(int8_t x, int8_t y) {
  return (int8_t)((uint8_t)x * (uint8_t)y);
}
static inline int16_t core_num__i16__wrapping_add(int16_t x, int16_t y) {
  return (int16_t)((uint16_t)x + (uint16_t)y);
}
static inline int16_t core_num__i16__wrapping_sub(int16_t x, int16_t y) {
  return (int16_t)((uint16_t)x - (uint16_t)y);
}
static inline int16_t core_num__i16__wrapping_mul(int16_t x, int16_t y) {
  return (int16_t)((uint16_t)x * (uint16_t)y);
}
static inline int32_t core_num__i32__wrapping_add(int32_t x, int32_t y) {
  return (int32_t)((uint32_t)x + (uint32_t)y);
}
static inline int32_t core_num__i32__wrapping_sub(int32_t x, int32_t y) {
  return (int32_t)((uint32_t)x - (uint32_t)y);
}
static inline int32_t core_num__i32__wrapping_mul(int32_t x, int32_t y) {
  return (int32_t)((uint32_t)x * (uint32_t)y);
}
static inline int64_t core_num__i64__wrapping_add(int64_t x, int64_t y) {
  return (int64_t)((uint64_t)x + (uint64_t)y);
}
static inline int64_t core_num__i64__wrapping_sub(int64_t x, int64_t y) {
  return (int64_t)((uint64_t)x - (uint64_t)y);
}
static inline int64_t core_num__i64__wrapping_mul(int64_t x, int64_t y) {
  return (int64_t)((uint64_t)x * (uint64_t)y);
}
static inline int8_t core_num__i8__wrapping_neg(int8_t x) {
  return (int8_t)(-(uint8_t)x);
}
static inline int16_t core_num__i16__wrapping_neg(int16_t x) {
  return (int16_t)(-(uint16_t)x);
}
static inline int32_t core_num__i32__wrapping_neg(int32_t x) {
  return (int32_t)(-(uint32_t)x);
}
static inline int64_t core_num__i64__wrapping_neg(int64_t x) {
  return (int64_t)(-(uint64_t)x);
}

static inline uint64_t core_num__u64__rotate_left(uint64_t x0, uint32_t x1) {
  return (x0 << x1) | (x0 >> ((-x1) & 63));
}

static inline void core_ops_arith__i32__add_assign(int32_t *x0, int32_t *x1) {
  *x0 = *x0 + *x1;
}

static inline uint8_t Eurydice_bitand_pv_u8(const uint8_t *p, uint8_t v) {
  return (*p) & v;
}
static inline uint8_t Eurydice_shr_pv_u8(const uint8_t *p, int32_t v) {
  return (*p) >> v;
}
static inline uint32_t Eurydice_min_u32(uint32_t x, uint32_t y) {
  return x < y ? x : y;
}

static inline uint8_t
core_ops_bit__core__ops__bit__BitAnd_u8__u8__for__0__u8___bitand(
    const uint8_t *x0, uint8_t x1) {
  return Eurydice_bitand_pv_u8(x0, x1);
}

static inline uint8_t
core_ops_bit__core__ops__bit__Shr_i32__u8__for__0__u8___shr(const uint8_t *x0,
                                                            int32_t x1) {
  return Eurydice_shr_pv_u8(x0, x1);
}

#define core_num_nonzero_private_NonZeroUsizeInner size_t
static inline core_num_nonzero_private_NonZeroUsizeInner
core_num_nonzero_private___core__clone__Clone_for_core__num__nonzero__private__NonZeroUsizeInner___clone(
    core_num_nonzero_private_NonZeroUsizeInner *x0) {
  return *x0;
}

#if defined(__cplusplus) && !defined(KRML_CXX17_COMPAT)
}
#endif

// ITERATORS

#define Eurydice_range_iter_next(iter_ptr, t, ret_t)                           \
  (((iter_ptr)->start >= (iter_ptr)->end)                                      \
       ? (KRML_CLITERAL(ret_t){EURYDICE_CFIELD(.tag =) 0,                      \
                               EURYDICE_CFIELD(.f0 =) 0})                      \
       : (KRML_CLITERAL(ret_t){EURYDICE_CFIELD(.tag =) 1,                      \
                               EURYDICE_CFIELD(.f0 =)(iter_ptr)->start++}))

#define core_iter_range__core__iter__traits__iterator__Iterator_A__for_core__ops__range__Range_A__TraitClause_0___next \
  Eurydice_range_iter_next

// See note in karamel/lib/Inlining.ml if you change this
#define Eurydice_into_iter(x, t, _ret_t, _) (x)
#define core_iter_traits_collect__core__iter__traits__collect__IntoIterator_Clause1_Item__I__for_I__into_iter \
  Eurydice_into_iter

// STRINGS

typedef char Eurydice_c_char_t;
typedef const Eurydice_c_char_t *Prims_string;
typedef void Eurydice_c_void_t;

// UNSAFE CODE

#define core_slice___Slice_T___as_mut_ptr(x, t, _) (x.ptr)
#define core_mem_size_of(t, _) (sizeof(t))
#define core_slice_raw_from_raw_parts_mut(ptr, len, _0, _1)                    \
  (KRML_CLITERAL(Eurydice_slice){(void *)(ptr), len})
#define core_slice_raw_from_raw_parts(ptr, len, _0, _1)                        \
  (KRML_CLITERAL(Eurydice_slice){(void *)(ptr), len})

// FIXME: add dedicated extraction to extract NonNull<T> as T*
#define core_ptr_non_null_NonNull void *

// PRINTING
//
// This is temporary. Ultimately we want to be able to extract all of this.

typedef void *core_fmt_Formatter;
#define core_fmt_rt__core__fmt__rt__Argument__a___new_display(x1, x2, x3, x4)  \
  NULL

// BOXES

#ifndef EURYDICE_MALLOC
#define EURYDICE_MALLOC malloc
#endif

#ifndef EURYDICE_REALLOC
#define EURYDICE_REALLOC realloc
#endif

static inline char *malloc_and_init(size_t sz, char *init) {
  char *ptr = (char *)EURYDICE_MALLOC(sz);
  if (ptr != NULL)
    memcpy(ptr, init, sz);
  return ptr;
}

#define Eurydice_box_new(init, t, t_dst)                                       \
  ((t_dst)(malloc_and_init(sizeof(t), (char *)(&init))))

// Initializer for array of size zero
#define Eurydice_empty_array(dummy, t, t_dst) ((t_dst){.data = {}})

#define Eurydice_box_new_array(len, ptr, t, t_dst)                             \
  ((t_dst)(malloc_and_init(len * sizeof(t), (char *)(ptr))))

// FIXME this needs to handle allocation failure errors, but this seems hard to
// do without evaluating malloc_and_init twice...
#define alloc_boxed__alloc__boxed__Box_T___try_new(init, t, t_ret)             \
  ((t_ret){.tag = core_result_Ok,                                              \
           .f0 = (t *)malloc_and_init(sizeof(t), (char *)(&init))})

// VECTORS

// We adapt the layout of https://doc.rust-lang.org/std/vec/struct.Vec.html,
// dispensing with the nested RawVec -- basically, we follow what the
// documentation says. Just like Eurydice_slice, we keep sizes in number of
// elements. This means we pass three words by value whenever we carry a vector
// around. Things that modify the vector take &mut's in Rust, or a Eurydice_vec*
// in C.
//
// Another design choice: just like Eurydice_slice, we treat Eurydice_vec as an
// opaque type, and rely on macros receiving their type arguments at call-site
// to perform necessary casts. A downside is that anything that looks into the
// definition of Eurydice_vec must be exposed (from the eurydice point of view)
// as an external -- see, for instance, Eurydice_vec_failed, below.
typedef struct {
  char *ptr;
  size_t len;      /* current length, in elements */
  size_t capacity; /* the size of the allocation, in number of elements */
} Eurydice_vec, alloc_vec_Vec;

// This is a helper that Eurydice has special knowledge about. Essentially,
// allocation functions return a result type that has been monomorphized, say,
// Result_XY; this means we need to do something like:
//   Eurydice_vec v = try_with_capacity(len, sz);
//   Result_XY r = v.ptr == NULL ? (Result_XY) { .tag = core_result_Ok, .case_Ok
//   = v }
//     : (Result_XY) { .tag = core_result_Error, .case_Error = ... };
// but with a macro (since we don't have templates).
// However, unless we allow statement-expressions (GCC extension), we cannot do
// the above with an expression, since we need to name the result of
// try_with_capacity to avoid evaluating it twice.
static inline Eurydice_vec Eurydice_vec_alloc2(size_t len, size_t element_sz) {
  return ((Eurydice_vec){.ptr = (char *)EURYDICE_MALLOC(len * element_sz),
                         .len = len,
                         .capacity = len});
}

#define Eurydice_vec_alloc(len, t, _) (Eurydice_vec_alloc2((len), sizeof(t)))
#define Eurydice_vec_overflows(len, t, _) (!((len) <= SIZE_MAX / (sizeof(t))))
#define Eurydice_vec_failed(v, _, _1) ((v).ptr == NULL)
#define Eurydice_layout(t, _)                                                  \
  ((core_alloc_layout_Layout){.size = sizeof(t), .align = _Alignof(t)})

#define alloc_vec__alloc__vec__Vec_T___resize(                                 \
    /* Eurydice_vec * */ v, /* size_t */ new_len, /* T */ elt, T, _0, _1)      \
  do {                                                                         \
    if (new_len <= (v)->capacity)                                              \
      (v)->len = new_len;                                                      \
    else {                                                                     \
      (v)->ptr = EURYDICE_REALLOC((v)->ptr, new_len * sizeof(T));              \
      /* TODO: check success? Rust function is infallible */                   \
      for (size_t i = (v)->len; i < new_len; i++)                              \
        ((T *)(v)->ptr)[i] = elt;                                              \
      (v)->len = new_len;                                                      \
      (v)->capacity = new_len;                                                 \
    }                                                                          \
  } while (0)

#define alloc_vec__alloc__vec__Vec_T___into_boxed_slice(/* Eurydice_vec */ v,  \
                                                        T, _0, _1)             \
  ((Eurydice_slice){.ptr = (v).ptr, .len = (v).len})

#define alloc_boxed__alloc__boxed__Box_T___from_raw(x, _0, _1) (x)
#define alloc_boxed__alloc__boxed__Box_T___into_raw(x, _0, _1) (x)


================================================
FILE: lib/AstOfLlbc.ml
================================================
(* C for Charon *)
module C = struct
  include Charon.GAst
  include Charon.LlbcAst
  include Charon.Types
  include Charon.TypesUtils
  include Charon.Expressions
  include Charon.Values
  include Charon.GAstUtils

  (* Fails if the variable is bound *)
  let expect_free_var = function
    | Free id -> id
    | Bound _ -> failwith "Found unexpected bound variable"

  let tsubst cgs ts ty =
    begin
      object
        inherit [_] map_ty
        method! visit_TVar _ v = TypeVarId.nth ts (expect_free_var v)
        method! visit_CVar _ v = ConstGenericVarId.nth cgs (expect_free_var v)
        method visit_'r _ x = x
      end
    end
      #visit_ty
      () ty
end

module LidMap = Krml.Idents.LidMap
module K = Krml.Ast
module L = Logging
open Krml.PrintAst.Ops

let fail fmt =
  let b = Buffer.create 256 in
  Printf.kbprintf (fun b -> failwith (Buffer.contents b)) b fmt

(** Environment *)

(* The various kinds of binders we insert in the expression scope. Usually come
   in this order, the first three being only ever inserted upon entering a function
   definition. *)
type var_id =
  | TraitClauseMethod of {
      clause_id : C.trait_ref_kind;
      method_id : C.trait_method_id;
      item_name : string;
      pretty_name : string;
      ts : K.type_scheme;
    }
  | TraitClauseConstant of {
      clause_id : C.trait_ref_kind;
      item_name : string;
      pretty_name : string;
    }
  | ConstGenericVar of C.const_generic_var_id
  | Var of C.local_id * C.ety (* the ety aids code-generation, sometimes *)

type env = {
  (* Lookup functions to resolve various id's into actual declarations. *)
  get_nth_function : C.FunDeclId.id -> C.fun_decl;
  get_nth_type : C.TypeDeclId.id -> C.type_decl;
  get_nth_global : C.GlobalDeclId.id -> C.global_decl;
  get_nth_trait_impl : C.TraitImplId.id -> C.trait_impl;
  get_nth_trait_decl : C.TraitDeclId.id -> C.trait_decl;
  crate : C.crate;
  (* Needed by the name matching logic *)
  name_ctx : Charon.NameMatcher.ctx;
  generic_params : C.generic_params;
  (* We have three lists of binders, which allow us to go from a Rust variable
     to a corresponding krml AST variable; everything is in De Bruijn, so
     looking up a variable is essentially List.nth. To understand why we have
     three lists here, we review the binding structure of the target (krml) AST.

     The target AST has three binding scopes: cg vars, type vars and expression
     vars. Type vars and type expressions are standard and have their own
     scopes, and corresponding variable nodes (TBound for type variables, Bound
     for expression variables). Const-generic variables are more complicted,
     because they appear in *both* types and expressions; there is a *third*
     scope of cg variables, with the following behavior:
     - in types, CgVar and TCgArray contain DeBruijn indices referring to the cg
       scope (standard), while
     - in expressions, there is no ECgVar, so we repeat cg vars at the beginning
       of the expression scope, and we rely on a regular EBound node to refer to
       cg variables (trick). This trick avoids a combinatorial explosion of
       substitution functions and makes sure all 60+ existing passes of krml do
       *not* need to be aware of the addition of const-generics (except for
       monomorphization, of course).
     In short, the third scope for cg variables only applies for CgVar and
     TCgArray; for expressions, cg variables masquerade as expression variables
     and live as the first N variables of that scope.

     To implement this, we rely on the corresponding three lists of binders,
     with the additional caveat that push_cg_binder pushes in both cg_binders
     and binders (see rationale above).

     Example: fn f<const N: usize, T: Copy>(x: [T; N]) -> usize { N }
     Upon entering the body of f, we have:
     - cg_binders: [ N, usize ]
     - type_binders: [ T ]
     - binders: [ `Cg (N, usize); `Clause (T: Copy, "copy"); `Var (x: [T; N]) ]

     After translation, we get:
     DFunction (..., 1 (* one type var *), 2 (* one cg var *), [
       "N": TInt usize;
       "x": TCgArray (TBound 0, 0); (* types use the cg scope *)
     ], EBound 2 (* expressions refer to the copy of the cg var as an expression var *)
  *)
  cg_binders : (C.const_generic_var_id * K.typ) list;
  type_binders : C.type_var_id list;
  binders : (var_id * K.typ) list;
  (* For printing. *)
  format_env : Charon.Print.fmt_env;
  (* For picking pretty names *)
  crate_name : string;
}

let debug env =
  L.log "DebugEnv" "\n# Debug Env";
  List.iteri
    (fun i v ->
      L.log "DebugEnv" "type_binders[%d]: %s\n" i (Charon.Print.type_var_id_to_pretty_string v))
    env.type_binders

(* Environment: types *)

let findi p l =
  let rec findi i l =
    match l with
    | hd :: tl ->
        if p hd then
          i, hd
        else
          findi (i + 1) tl
    | [] -> raise Not_found
  in
  findi 0 l

let fst3 (x, _, _) = x
let snd3 (_, x, _) = x
let thd3 (_, _, x) = x

(* Suitable in types -- in expressions, use lookup_cg_in_expressions. *)
let lookup_cg_in_types env v1 =
  let i, (_, t) = findi (fun (v2, _) -> v1 = v2) env.cg_binders in
  i, t

let lookup_typ env (v1 : C.type_var_id) =
  let i, _ = findi (( = ) v1) env.type_binders in
  i

let push_type_binder env (t : C.type_param) =
  { env with type_binders = t.index :: env.type_binders }

let push_type_binders env (ts : C.type_param list) = List.fold_left push_type_binder env ts

(** Helpers: types *)

let with_any = K.(with_type TAny)
let is_dst_ref lid = Builtin.(lid = dst_ref_mut || lid = dst_ref_shared)

let assert_slice (t : K.typ) =
  match t with
  | TApp (lid, [ t; u ]) when is_dst_ref lid && u = TInt SizeT -> t
  | _ -> fail "Not a slice: %a" ptyp t

let string_of_path_elem (env : env) (p : Charon.Types.path_elem) : string =
  Charon.Print.path_elem_to_string env.format_env p

let string_of_name env ps = String.concat "::" (List.map (string_of_path_elem env) ps)

let mk_field_name f i =
  match f with
  | Some f -> f
  | None -> "f" ^ string_of_int i

let is_enum (env : env) (id : C.type_decl_id) : bool =
  let decl = env.get_nth_type id in
  match decl.C.kind with
  | Enum branches -> List.for_all (fun v -> v.C.fields = []) branches
  | _ -> false

let mk_enum_case lid c = fst lid @ [ snd lid ], c

(* Helpers: traits finding & matching *)

module RustNames = struct
  open Charon.NameMatcher

  let config =
    {
      map_vars_to_vars = false;
      match_with_trait_decl_refs = true;
      (* use_trait_decl_refs = true; *)
    }

  let vec = parse_pattern "alloc::vec::Vec<@>"
  let range = parse_pattern "core::ops::range::Range<@>"
  let option = parse_pattern "core::option::Option<@>"

  (* Just to have a uniform view of the table of distinguished declarations *)
  let builtin_of_function decl : Builtin.builtin =
    match decl with
    | Krml.Ast.DFunction (_, _, n_cgs, n_type_args, ret_t, name, binders, _) ->
        if n_cgs > List.length binders then
          Krml.Warn.fatal_error "n_cgs=%d, but List.length binders=%d for %a\n" n_cgs
            (List.length binders) Krml.PrintAst.Ops.plid name;
        let cg_args, rest = Krml.KList.split n_cgs binders in
        {
          name;
          typ = Krml.Helpers.fold_arrow (List.map (fun (x : Krml.Ast.binder) -> x.typ) rest) ret_t;
          n_type_args;
          cg_args = List.map (fun (x : Krml.Ast.binder) -> x.typ) cg_args;
          arg_names = List.map (fun (x : Krml.Ast.binder) -> x.node.name) rest;
        }
    | _ -> failwith "impossible"

  let known_builtins no_const =
    let ( || ) no_const_variant default =
      if no_const then
        no_const_variant
      else
        default
    in
    [
    (* slices *)
    parse_pattern "SliceIndexShared<'_, @T>", Builtin.(slice_index_mut || slice_index_shared);
    parse_pattern "SliceIndexMut<'_, @T>", Builtin.slice_index_mut;

    parse_pattern "core::slice::index::{core::ops::index::Index<[@T], @I, @Clause2_Output>}::index<'_, @, core::ops::range::Range<usize>, [@]>", builtin_of_function Builtin.(slice_subslice_func_mut || slice_subslice_func_shared);
    parse_pattern "core::slice::index::{core::ops::index::IndexMut<[@T], @I, @Clause2_Output>}::index_mut<'_, @, core::ops::range::Range<usize>, [@]>", builtin_of_function Builtin.slice_subslice_func_mut;
    parse_pattern "core::slice::index::{core::ops::index::Index<[@T], @I, @Clause2_Output>}::index<'_, @, core::ops::range::RangeTo<usize>, [@]>", builtin_of_function Builtin.(slice_subslice_to_func_mut || slice_subslice_to_func_shared);
    parse_pattern "core::slice::index::{core::ops::index::IndexMut<[@T], @I, @Clause2_Output>}::index_mut<'_, @, core::ops::range::RangeTo<usize>, [@]>", builtin_of_function Builtin.slice_subslice_to_func_mut;
    parse_pattern "core::slice::index::{core::ops::index::Index<[@T], @I, @Clause2_Output>}::index<'_, @, core::ops::range::RangeFrom<usize>, [@]>", builtin_of_function Builtin.(slice_subslice_from_func_mut || slice_subslice_from_func_shared);
    parse_pattern "core::slice::index::{core::ops::index::IndexMut<[@T], @I, @Clause2_Output>}::index_mut<'_, @, core::ops::range::RangeFrom<usize>, [@]>", builtin_of_function Builtin.slice_subslice_from_func_mut;

    (* arrays *)
    parse_pattern "core::array::{core::ops::index::Index<[@T; @N], @I, @Clause2_Clause0_Output>}::index<'_, @, core::ops::range::Range<usize>, [@], @>", builtin_of_function Builtin.(array_to_subslice_func_mut || array_to_subslice_func_shared);
    parse_pattern "core::array::{core::ops::index::IndexMut<[@T; @N], @I, @Clause2_Clause0_Output>}::index_mut<'_, @, core::ops::range::Range<usize>, [@], @>", builtin_of_function Builtin.array_to_subslice_func_mut;
    parse_pattern "core::array::{core::ops::index::Index<[@T; @N], @I, @Clause2_Clause0_Output>}::index<'_, @, core::ops::range::RangeTo<usize>, [@], @>", builtin_of_function Builtin.(array_to_subslice_to_func_mut || array_to_subslice_to_func_shared);
    parse_pattern "core::array::{core::ops::index::IndexMut<[@T; @N], @I, @Clause2_Clause0_Output>}::index_mut<'_, @, core::ops::range::RangeTo<usize>, [@], @>", builtin_of_function Builtin.array_to_subslice_to_func_mut;
    parse_pattern "core::array::{core::ops::index::Index<[@T; @N], @I, @Clause2_Clause0_Output>}::index<'_, @, core::ops::range::RangeFrom<usize>, [@], @>", builtin_of_function Builtin.(array_to_subslice_from_func_mut || array_to_subslice_from_func_shared);
    parse_pattern "core::array::{core::ops::index::IndexMut<[@T; @N], @I, @Clause2_Clause0_Output>}::index_mut<'_, @, core::ops::range::RangeFrom<usize>, [@], @>", builtin_of_function Builtin.array_to_subslice_from_func_mut;

    (* slices <-> arrays *)
    parse_pattern "ArrayToSliceShared<'_, @T, @N>", builtin_of_function Builtin.(array_to_slice_func_mut || array_to_slice_func_shared);
    parse_pattern "ArrayToSliceMut<'_, @T, @N>", builtin_of_function Builtin.array_to_slice_func_mut;
    parse_pattern "core::convert::{core::convert::TryInto<@T, @U, @Clause2_Error>}::try_into<&'_ [@T], [@T; @], core::array::TryFromSliceError>", Builtin.slice_to_array;
    parse_pattern "core::convert::{core::convert::TryInto<@T, @U, @Clause2_Error>}::try_into<&'_ mut [@T], [@T; @], core::array::TryFromSliceError>", Builtin.slice_to_array;
    parse_pattern "core::convert::{core::convert::TryInto<@T, @U, @Clause2_Error>}::try_into<&'_ [@T], &'_ [@T; @], core::array::TryFromSliceError>", Builtin.slice_to_ref_array;
    parse_pattern "core::convert::{core::convert::TryInto<@T, @U, @Clause2_Error>}::try_into<&'_ mut [@T], &'_ mut [@T; @], core::array::TryFromSliceError>", Builtin.slice_to_ref_array;

    (* bitwise & arithmetic operations *)
    parse_pattern "core::ops::bit::BitAnd<&'_ u8, u8>::bitand", Builtin.bitand_pv_u8;
    parse_pattern "core::ops::bit::Shr<&'_ u8, i32>::shr", Builtin.shr_pv_u8;

    (* misc *)
    parse_pattern "core::cmp::Ord<u32>::min", Builtin.min_u32;

    (* boxes *)
    parse_pattern "alloc::boxed::{alloc::boxed::Box<@T>}::new<@>", Builtin.box_new;
  ]
  [@ocamlformat "disable"]

  let from_u16 = parse_pattern "core::convert::From<u16, @U>::from"
  let from_u32 = parse_pattern "core::convert::From<u32, @U>::from"
  let from_u64 = parse_pattern "core::convert::From<u64, @U>::from"
  let from_u128 = parse_pattern "core::convert::From<u128, @U>::from"
  let from_i16 = parse_pattern "core::convert::From<i16, @U>::from"
  let from_i32 = parse_pattern "core::convert::From<i32, @U>::from"
  let from_i64 = parse_pattern "core::convert::From<i64, @U>::from"
  let from_i128 = parse_pattern "core::convert::From<i128, @U>::from"
  let from = parse_pattern "core::convert::From<@T, @U>::from"
  let into_u16 = parse_pattern "core::convert::Into<@U, u16>::into"
  let into_u32 = parse_pattern "core::convert::Into<@U, u32>::into"
  let into_u64 = parse_pattern "core::convert::Into<@U, u64>::into"
  let into_u128 = parse_pattern "core::convert::Into<@U, u128>::into"
  let into_i16 = parse_pattern "core::convert::Into<@U, i16>::into"
  let into_i32 = parse_pattern "core::convert::Into<@U, i32>::into"
  let into_i64 = parse_pattern "core::convert::Into<@U, i64>::into"
  let into_i128 = parse_pattern "core::convert::Into<@U, i128>::into"
  let into = parse_pattern "core::convert::Into<@U, @T>::into"
  let is_vec env = match_pattern_with_type_id env.name_ctx config (mk_empty_maps ()) vec
  let is_range env = match_pattern_with_type_id env.name_ctx config (mk_empty_maps ()) range
  let is_option env = match_pattern_with_type_id env.name_ctx config (mk_empty_maps ()) option
end

let string_of_pattern pattern = Charon.NameMatcher.(pattern_to_string { tgt = TkPattern } pattern)

let pattern_of_fn_ptr env fn_ptr =
  Charon.NameMatcher.(
    fn_ptr_to_pattern env.name_ctx
      { tgt = TkPattern; use_trait_decl_refs = true }
      Charon.TypesUtils.empty_generic_params fn_ptr)

let pattern_of_name env name =
  Charon.NameMatcher.(
    name_to_pattern env.name_ctx { tgt = TkPattern; use_trait_decl_refs = true } name)

let string_of_fn_ptr env fn_ptr = string_of_pattern (pattern_of_fn_ptr env fn_ptr)

(** Translation of types *)

let lid_of_name (env : env) (name : Charon.Types.name) : K.lident =
  let prefix, name = Krml.KList.split_at_last name in
  List.map (string_of_path_elem env) prefix, string_of_path_elem env name

let width_of_integer_type (t : Charon.Types.integer_type) : K.width =
  match t with
  | Signed Isize -> PtrdiffT
  | Signed I8 -> Int8
  | Signed I16 -> Int16
  | Signed I32 -> Int32
  | Signed I64 -> Int64
  | Signed I128 ->
      failwith "Internal error: `i128` should not be handled in `width_of_integer_type`."
  | Unsigned Usize -> SizeT
  | Unsigned U8 -> UInt8
  | Unsigned U16 -> UInt16
  | Unsigned U32 -> UInt32
  | Unsigned U64 -> UInt64
  | Unsigned U128 ->
      failwith "Internal error: `u128` should not be handled in `width_of_integer_type`."

let lid_of_type_decl_id (env : env) (id : C.type_decl_id) =
  let { C.item_meta; _ } = env.get_nth_type id in
  lid_of_name env item_meta.name

let constant_of_scalar_value sv =
  let w = width_of_integer_type (Charon.Scalars.get_ty sv) in
  w, Z.to_string (Charon.Scalars.get_val sv)

let assert_cg_scalar : C.constant_expr -> C.scalar_value = function
  | { kind = C.CLiteral (VScalar n); _ } -> n
  | cg -> failwith ("Unsupported: non-constant const generic: " ^ C.show_constant_expr cg)

let cg_of_const_generic env (cg : C.constant_expr) =
  match cg.kind with
  | C.CVar var -> K.CgVar (fst (lookup_cg_in_types env (C.expect_free_var var)))
  | C.CLiteral (VScalar sv) -> CgConst (constant_of_scalar_value sv)
  | _ -> failwith ("cg_of_const_generic: " ^ Charon.Print.constant_expr_to_string env.format_env cg)

let float_width float_ty : K.width =
  match float_ty with
  | C.F32 -> Float32
  | C.F64 -> Float64
  | C.F16 | C.F128 -> failwith "TODO: f16 & f128 are not supported."

let typ_of_literal_ty (_env : env) (ty : Charon.Types.literal_type) : K.typ =
  match ty with
  | TBool -> K.TBool
  | TChar -> Builtin.char_t
  | TFloat f -> K.TInt (float_width f)
  | TInt C.I128 -> Builtin.int128_t
  | TUInt C.U128 -> Builtin.uint128_t
  | _ -> K.TInt (width_of_integer_type (Charon.TypesUtils.literal_as_integer ty))

let const_of_ref_kind kind =
  if !Options.no_const then
    false
  else
    match kind with
    | C.RMut -> false
    | C.RShared -> true

let const_of_borrow_kind bk =
  if !Options.no_const then
    false
  else
    match bk with
    | C.BShared -> true
    | C.BShallow -> true
    | _ -> false

let const_of_tbuf b =
  if !Options.no_const then
    false
  else
    match b with
    | K.TBuf (_, const) -> const
    | _ -> failwith "not a tbuf"

(* e: Eurydice_dst<t> *)
let mk_dst_deref _env t e =
  (* ptr_field: t* *)
  (* XXX need proper const here *)
  let ptr_field = K.(with_type (TBuf (t, true)) (EField (e, "ptr"))) in
  K.(with_type t (EBufRead (ptr_field, Krml.Helpers.zero_usize)))

let ensure_named i name =
  match name, i with
  | None, 0 -> "fst"
  | None, 1 -> "snd"
  | None, 2 -> "thd"
  | None, _ -> Printf.sprintf "field%d" i
  | Some name, _ -> name

let lookup_field env typ_id field_id =
  let ty_decl = env.get_nth_type typ_id in
  let fields =
    match ty_decl.kind with
    | Struct fields -> fields
    | _ -> failwith "not a struct"
  in
  let i = C.FieldId.to_int field_id in
  let field = List.nth fields i in
  ensure_named i field.field_name

let mk_expr_arr_struct (expr_array : K.expr) = K.EFlat [ Some "data", expr_array ]

(** A vtable type is actually just a struct type, this function takes out the hinted ID of the
    vtable struct from the dynamic predicate and then translate it, returns a reference to the
    struct type itself.

    Notably, a dynamic predicate is of the form:
    [dyn Trait<TraitArgs, AssocTy=T, ...> + AutoTraits + 'a]. Namely, it has the arguments to the
    unique non-auto trait and the assignments to each associated types as the **principal trait**
    [Trait<...>], and then some additional auto-traits having no methods and finally a region
    constraint. Here we care only about the principal trait. *)
let rec vtable_typ_of_dyn_pred (env : env) (pred : C.dyn_predicate) : K.typ =
  let binder_params = pred.binder.binder_params in
  match binder_params.trait_clauses with
  | [] -> failwith "DynTrait has empty clause! Please report this to Charon."
  (* As guaranteed by Rustc and hence Charon, the first clause must be the principal trait *)
  | principal_clause :: _ -> (
      let tref = principal_clause.trait in
      let decl = env.get_nth_trait_decl tref.binder_value.id in
      match decl.vtable with
      | None ->
          failwith "Fetching vtable from a trait without vtable! Please report this to Charon."
      | Some ty_ref ->
          (* The ty_ref here is of the form: `{vtable}<TraitParams, AssocTys>` *)
          (* Hence we need to firstly substitute `TraitParams` with the actual types provided by the dynamic predicate's `TraitArgs` *)
          (* And then substitute `AssocTys` with the actual types provided by the dynamic predicate's assignments to these associated types *)
          (* The trait ref is guaranteed to be with empty binding values in the principal clause *)
          (* Yet, we will need to move shift the internal DeBruijn indices with `extract_from_binder` *)
          let tref = Charon.Substitute.(extract_from_binder trait_decl_ref_substitute tref) in
          (* First step: get the `TraitArgs` *)
          let base_args =
            let generics = tref.generics in
            { generics with types = List.tl generics.types }
          in
          (* Second step: find from the assignments of assoc tys *)
          let assoc_tys =
            let base_removal = fun l -> snd (Krml.KList.split (List.length base_args.types) l) in
            let find_assoc_ty_arg = function
              | C.TTraitType (tref, name) ->
                  (* We match by the trait-ID and the assoc-ty name, which should be unique *)
                  let target_id = tref.trait_decl_ref.binder_value.id in
                  let assoc_ty_assns = binder_params.trait_type_constraints in
                  let finder (binded_assn : C.trait_type_constraint C.region_binder) =
                    let assn =
                      Charon.Substitute.(
                        extract_from_binder trait_type_constraint_substitute binded_assn)
                    in
                    if
                      assn.trait_ref.trait_decl_ref.binder_value.id = target_id
                      && assn.type_name = name
                    then
                      Some assn.ty
                    else
                      None
                  in
                  begin
                    match List.find_map finder assoc_ty_assns with
                    | Some ty -> ty
                    | None ->
                        fail "Could not find associated type assignment for associated type %s" name
                  end
              | _ ->
                  failwith
                    "This should not happen: the rest of the generic types in a vtable-ref in a \
                     trait-decl should all be referring to associated types."
            in
            ty_ref.generics.types
            (* Remove the base param types from it, leaving the associated types params *)
            |> base_removal
            (* For each assoc type param, find the corresponding arg from the dyn predicate *)
            |> List.map find_assoc_ty_arg
          in
          let args = { base_args with types = base_args.types @ assoc_tys } in
          let ty_args_ref = { ty_ref with generics = args } in
          typ_of_ty env (C.TAdt ty_args_ref))

(* This functions takes a Charon type, and returns the associated metadata as a krml type,
   or None if there is no metadata *)
and metadata_typ_of_ty (env : env) (ty : Charon.Types.ty) : K.typ option =
  match ty with
  | C.TAdt ty_decl_ref -> begin
      match ty_decl_ref.id with
      | C.TAdtId decl_id -> begin
          let decl = env.get_nth_type decl_id in
          match decl.ptr_metadata with
          | C.NoMetadata -> None
          | C.Length -> Some Krml.Helpers.usize
          | C.VTable ty_ref ->
              let ty_ref = { ty_ref with generics = ty_decl_ref.generics } in
              Some (K.TBuf (typ_of_ty env (C.TAdt ty_ref), false))
          | C.InheritFrom (C.TVar (C.Free var)) ->
              let ty = List.nth ty_decl_ref.generics.types (C.TypeVarId.to_int var) in
              metadata_typ_of_ty env ty
          | C.InheritFrom _ ->
              failwith
                "Eurydice does not handle PtrMetadata inheritance, please consider using \
                 monomorphized LLBC"
        end
      | C.TTuple -> begin
          match List.rev @@ ty_decl_ref.generics.types with
          (* Empty metadata for empty tuple *)
          | [] -> None
          (* For tuple, the type of metadata is the last element *)
          | last :: _ -> metadata_typ_of_ty env last
        end
      | C.TBuiltin C.TBox -> None
      | C.TBuiltin C.TStr -> Some Krml.Helpers.usize
    end
  | C.TArray _ -> None
  | C.TSlice _ -> Some Krml.Helpers.usize
  | C.TVar _ ->
      (* TEMPORARY:  this needs to be enabled once the monomorphization PR lands --
    for now, there are still polymorphic type definitions of the form type
    Foo<T: ?Sized> = ... in the AST (those will be monomorphized away, eventually) *)
      let _var_is_sized (clause : C.trait_param) =
        let trait = clause.trait.binder_value in
        match trait.generics.types with
        | [] -> failwith "Unexpected empty `Self` from trait clause."
        (* The variable here in C.TVar should be free variable, hence no need to adjust the DB id. *)
        | self :: _ ->
            self = ty
            &&
            let decl = env.get_nth_trait_decl trait.id in
            (* It has the Sized marker, which is of lang_item "sized" *)
            decl.item_meta.lang_item = Some "sized"
      in
      let var_is_sized =
        true
        (*List.exists var_is_sized env.generic_params.trait_clauses*)
      in
      if var_is_sized then
        None
      else
        failwith
          "Eurydice does not handle taking metadata from non-Sized type vars, please consider \
           using monomorphized LLBC."
  | C.TTraitType (_, _) ->
      failwith
        "Eurydice does not handle taking metadata from assoc types, please consider using \
         monomorphized LLBC."
  (* The metadata of a &dyn Trait object is a pointer to its vtable *)
  | C.TDynTrait pred -> Some (K.TBuf (vtable_typ_of_dyn_pred env pred, false))
  | C.TLiteral _ | C.TRef (_, _, _) | C.TRawPtr (_, _) | C.TFnPtr _ | C.TFnDef _ -> None
  (* The metadata must not have ptr metadata as they must be Sized. *)
  | C.TPtrMetadata _ -> None
  | C.TNever | C.TError _ -> failwith "Error types to fetch metadata"

(* Translate Charon type &T as a krml type -- this handles special cases
 where address-taking in Rust creates a DST, which we represent as instances
  of the dst_ref type. There are many such cases: slices, &str, etc. *)
and ptr_typ_of_ty (env : env) ~const (ty : Charon.Types.ty) : K.typ =
  (* Handle special cases first *)
  match ty with
  (* Special case to handle slice : &[T] *)
  | TSlice t -> Builtin.mk_slice ~const (typ_of_ty env t)
  (* Special case to handle &str *)
  | TAdt { id = TBuiltin TStr; _ } -> Builtin.str_t ~const
  (* Special case to handle DynTrait *)
  | TDynTrait pred ->
      Builtin.mk_dst_ref ~const Builtin.c_void_t (K.TBuf (vtable_typ_of_dyn_pred env pred, false))
  (* General case, all &T is turned to either thin T* or fat Eurydice::DstRef<T,Meta> *)
  | _ -> (
      let typ = typ_of_ty env ty in
      match metadata_typ_of_ty env ty with
      | None -> K.TBuf (typ, const)
      | Some meta -> Builtin.mk_dst_ref ~const typ meta)

and typ_of_ty (env : env) (ty : Charon.Types.ty) : K.typ =
  match ty with
  | TVar var -> K.TBound (lookup_typ env (C.expect_free_var var))
  | TLiteral t -> typ_of_literal_ty env t
  | TNever -> failwith "Impossible: Never"
  | TDynTrait _ -> failwith "TODO: dyn Trait"
  | TAdt { id = TBuiltin TBox; generics = { types = [ t ]; _ } } -> ptr_typ_of_ty ~const:false env t
  | TRef (_, t, rk) | TRawPtr (t, rk) ->
      let const = const_of_ref_kind rk in
      ptr_typ_of_ty env ~const t
  | TAdt { id; generics = { types = [ t ]; _ } as generics } when RustNames.is_vec env id generics
    -> Builtin.mk_vec (typ_of_ty env t)
  | TAdt { id = TAdtId id; generics = { types = args; const_generics = generic_args; _ } } ->
      let ts = List.map (typ_of_ty env) args in
      let cgs = List.map (cg_of_const_generic env) generic_args in
      let lid = lid_of_type_decl_id env id in
      K.fold_tapp (lid, ts, cgs)
  | TAdt { id = TTuple; generics = { types = args; const_generics; _ } } ->
      assert (const_generics = []);
      begin
        match args with
        | [] -> TUnit
        | [ t ] -> typ_of_ty env t (* charon issue #205 *)
        | _ -> TTuple (List.map (typ_of_ty env) args)
      end
  | TArray (t, cg) -> typ_of_struct_arr env t cg
  | TSlice t ->
      (* Appears in instantiations of patterns and generics, so we translate it to a placeholder. *)
      TApp (Builtin.derefed_slice, [ typ_of_ty env t ])
  | TAdt { id = TBuiltin TStr; generics = { types = []; _ } } -> Builtin.deref_str_t
  | TAdt { id = TBuiltin f; generics = { types = args; const_generics; _ } } ->
      List.iter (fun x -> print_endline (C.show_constant_expr x)) const_generics;
      fail "TODO: Adt/Builtin %s (%d) %d " (C.show_builtin_ty f) (List.length args)
        (List.length const_generics)
  | TTraitType _ -> failwith ("TODO: TraitTypes " ^ Charon.Print.ty_to_string env.format_env ty)
  | TFnPtr fn_sig ->
      let { C.inputs = ts; output = t; _ } = fn_sig.binder_value in
      let typs = List.map (typ_of_ty env) ts in
      let typs =
        match typs with
        | [] -> [ K.TUnit ]
        | typs -> typs
      in
      begin
        match typ_of_ty env t with
        | TArrow _ ->
            failwith
              "Function pointer `fn` currying is not supported, consider using `&'static dyn Fn` \
               instead."
        | typ -> Krml.Helpers.fold_arrow typs typ
      end
  | TFnDef bound_fn_ref -> begin
      match Charon.Substitute.lookup_fndef_sig env.crate bound_fn_ref with
      | None -> failwith "Missing function declaration"
      | Some fn_sig -> typ_of_ty env (TFnPtr fn_sig)
    end
  | TPtrMetadata _ ->
      failwith
        "The type-level computation `PtrMetadata(t)` should be handled by Charon, consider using \
         monomorphised LLBC."
  | TError _ -> failwith "Found type error in charon's output"

and typ_of_struct_arr (env : env) (t : C.ty) (cg : C.constant_expr) : K.typ =
  let typ_t = typ_of_ty env t in
  let cg = cg_of_const_generic env cg in
  Builtin.mk_arr typ_t cg

let maybe_cg_array (env : env) (t : C.ty) (cg : C.constant_expr) =
  match cg.kind with
  | CLiteral _ -> K.TArray (typ_of_ty env t, constant_of_scalar_value (assert_cg_scalar cg))
  | CVar var ->
      let id, cg_t = lookup_cg_in_types env (C.expect_free_var var) in
      assert (cg_t = K.TInt SizeT);
      K.TCgArray (typ_of_ty env t, id)
  | _ -> failwith "TODO: CgGlobal"

(* Environment: expressions *)

let is_var v2 v1 =
  match v2 with
  | Var (v2, _) -> v2 = v1
  | _ -> false

let assert_var = function
  | Var (v2, ty) -> v2, ty
  | _ -> assert false

let assert_trait_clause_method = function
  | TraitClauseMethod { ts; _ } -> ts
  | _ -> assert false

(* Regular binders *)

let lookup env v1 =
  let i, (_, t) = findi (fun (v2, _) -> is_var v2 v1) env.binders in
  i, t

let lookup_with_original_type env v1 =
  let i, (v, t) = findi (fun (v2, _) -> is_var v2 v1) env.binders in
  let _, ty = assert_var v in
  i, t, ty

(* Const generic binders *)

let push_cg_binder env (t : C.const_generic_param) =
  {
    env with
    cg_binders = (t.index, typ_of_ty env t.ty) :: env.cg_binders;
    binders = (ConstGenericVar t.index, typ_of_ty env t.ty) :: env.binders;
  }

let push_cg_binders env (ts : C.const_generic_param list) = List.fold_left push_cg_binder env ts

let push_binder env (t : C.local) =
  { env with binders = (Var (t.index, t.local_ty), typ_of_ty env t.local_ty) :: env.binders }

let push_binders env (ts : C.local list) = List.fold_left push_binder env ts

(* Clause binders, which only appear as function parameters, and hold an unknown
   trait method (dictionary-style). *)
let push_clause_binder env b = { env with binders = b :: env.binders }
let push_clause_binders env bs = List.fold_left push_clause_binder env bs

let lookup_clause_method env clause_id method_id =
  let i, (v, t) =
    try
      findi
        (function
          | TraitClauseMethod { clause_id = clause_id2; method_id = method_id2; _ }, _ ->
              clause_id2 = clause_id && method_id2 = method_id
          | _ -> false)
        env.binders
    with Not_found ->
      Krml.KPrint.bprintf "Error looking up %s.%s\n" (C.show_trait_ref_kind clause_id)
        (C.show_trait_method_id method_id);
      raise Not_found
  in
  i, t, assert_trait_clause_method v

let lookup_clause_constant env clause_id item_name =
  let i, (_, t) =
    try
      findi
        (function
          | TraitClauseConstant { clause_id = clause_id2; item_name = item_name2; _ }, _ ->
              clause_id2 = clause_id && item_name2 = item_name
          | _ -> false)
        env.binders
    with Not_found ->
      Krml.KPrint.bprintf "Error looking up %s.%s\n" (C.show_trait_ref_kind clause_id) item_name;
      raise Not_found
  in
  i, t

(** Translation of expressions (statements, operands, rvalues, places) *)

let uu =
  let r = ref 0 in
  fun () ->
    let suffix = string_of_int !r in
    incr r;
    "uu____" ^ suffix

let binder_of_var (env : env) (l : C.local) : K.binder =
  let name = Option.value ~default:(uu ()) l.name in
  let meta =
    match name with
    | "left_val" | "right_val" -> [ K.AttemptInline ]
    | _ -> []
  in
  let binder = Krml.Helpers.fresh_binder ~mut:true name (typ_of_ty env l.local_ty) in
  { binder with node = { binder.node with meta = meta @ binder.node.meta } }

let find_nth_variant (env : env) (typ : C.type_decl_id) (var : C.variant_id) =
  match env.get_nth_type typ with
  | { kind = Enum variants; _ } -> Charon.Types.VariantId.nth variants var
  | _ -> failwith "impossible: type is not a variant"

let rec with_locals (env : env) (t : K.typ) (locals : C.local list) (k : env -> 'a) : 'a =
  match locals with
  | [] -> k env
  | l :: locals ->
      let env = push_binder env l in
      let b = binder_of_var env l in
      K.(with_type t (ELet (b, Krml.Helpers.any, with_locals env t locals k)))

let lookup_cg_in_expressions (env : env) (v1 : C.const_generic_var_id) =
  let i, (_, t) = findi (fun (v2, _) -> v2 = ConstGenericVar v1) env.binders in
  i, t

let expression_of_cg_var_id env v =
  let i, t = lookup_cg_in_expressions env v in
  K.(with_type t (EBound i))

let expression_of_var_id (env : env) (v : C.local_id) : K.expr =
  let i, t = lookup env v in
  K.(with_type t (EBound i))

(** Assume here the maximum length is 128-bit -- will throw away the larger if larger. This is a
    helper function to split a 128-bit integer into two 64-bit integers and is not assumed to be
    used in other contexts. Returns the **expr** pair (high64bits, low64bits) *)
let split_128bit (value : Z.t) =
  let mask128 = Z.sub (Z.shift_left Z.one 128) Z.one in
  let mask64 = Z.sub (Z.shift_left Z.one 64) Z.one in
  (* Always truncate to 128 bits using bitwise AND *)
  let value = Z.logand value mask128 in
  (* Extract low 64 bits *)
  let low64 = Z.logand mask64 value in
  (* Shift right without sign extension (use logical shift) *)
  let high64 = Z.shift_right value 64 in
  let to_expr_u64bits v =
    let print_Z z = Z.format "%#x" z in
    K.with_type (K.TInt UInt64) @@ K.EConstant (UInt64, print_Z v)
  in
  to_expr_u64bits high64, to_expr_u64bits low64

let expression_of_int128_t (value : Z.t) =
  let i128_max = Z.sub (Z.shift_left Z.one 127) Z.one in
  if value > i128_max then
    failwith "value is larger than the maximum value of i128";
  let i128_min = Z.neg (Z.shift_left Z.one 127) in
  if value < i128_min then
    failwith "value is smaller than the minimum value of i128";
  let high64, low64 = split_128bit value in
  K.(with_type Builtin.int128_t (EApp (Builtin.(get_128_op ("i", "from_bits")), [ high64; low64 ])))

let expression_of_uint128_t (value : Z.t) =
  let u128_max = Z.sub (Z.shift_left Z.one 128) Z.one in
  if value > u128_max then
    failwith "value is larger than the maximum value of u128";
  let high64, low64 = split_128bit value in
  K.(
    with_type Builtin.uint128_t (EApp (Builtin.(get_128_op ("u", "from_bits")), [ high64; low64 ])))

let expression_of_scalar_value sv : K.expr =
  let int_ty = Charon.Scalars.get_ty sv in
  let value = Charon.Scalars.get_val sv in
  match int_ty with
  | C.Signed C.I128 -> expression_of_int128_t value
  | C.Unsigned C.U128 -> expression_of_uint128_t value
  | _ ->
      let w = width_of_integer_type int_ty in
      K.(with_type (TInt w) (EConstant (constant_of_scalar_value sv)))

let expression_of_literal (_env : env) (l : C.literal) : K.expr =
  match l with
  | VScalar sv -> expression_of_scalar_value sv
  | VBool b -> K.(with_type TBool (EBool b))
  | VStr s ->
      let ascii = Utf8.ascii_of_utf8_str s in
      let len = String.length s in
      K.(
        with_type (Builtin.str_t ~const:true)
          (EFlat
             [
               Some "ptr", with_type Krml.Checker.c_string (EString ascii);
               Some "meta", with_type Krml.Helpers.usize (EConstant (SizeT, string_of_int len));
             ]))
  | VChar c -> K.(with_type Builtin.char_t (EConstant (UInt32, string_of_int @@ Uchar.to_int c)))
  | VByteStr lst ->
      let str = List.map (Printf.sprintf "%#x") lst |> String.concat "" in
      K.(with_type Krml.Checker.c_string (EString str))
  | VFloat { C.float_ty; float_value } ->
      let w = float_width float_ty in
      K.(with_type (TInt w) (EConstant (w, float_value)))

let expression_of_const_generic env (cg : C.constant_expr) =
  match cg.kind with
  | C.CGlobal _ -> failwith "TODO: CgGLobal"
  | C.CVar var -> expression_of_cg_var_id env (C.expect_free_var var)
  | C.CLiteral l -> expression_of_literal env l
  | _ -> failwith "TODO: CgExpr"

let has_unresolved_generic (ty : K.typ) : bool =
  (object
     inherit [_] Krml.Ast.reduce
     method zero = false
     method plus = ( || )
     method! visit_TBound _ _ = true
  end)
    #visit_typ
    false ty

let rec expression_of_place (env : env) (p : C.place) : K.expr =
  (* We construct a target expression. Callers may still use the original type to tell arrays
     and references apart, since their *uses* (e.g. addr-of) compile in a type-directed way based on
     the *original* rust type *)
  match p.kind with
  | PlaceLocal var_id ->
      let i, t = lookup env var_id in
      K.(with_type t (EBound i))
  | PlaceGlobal { id; _ } ->
      let global = env.get_nth_global id in
      K.with_type (typ_of_ty env p.ty) (K.EQualified (lid_of_name env global.item_meta.name))
  | PlaceProjection (sub_place, PtrMetadata) -> begin
      let e = expression_of_place env sub_place in
      match e.typ with
      | TApp (lid, [ _; meta_ty ]) when is_dst_ref lid ->
          (* XXX need to adjust *)
          K.(with_type meta_ty (EField (e, "meta")))
      (* In cases like `PtrMetadata(T)` when `T` is a type variable or some types with unresolved type variable,
       We cannot tell the correct metadata type from it until fully monomorphized.
       But we can surely rely on monomorphized LLBC, and we ignore handling such cases in Eurydice. *)
      | ty when has_unresolved_generic ty ->
          failwith
            "Eurydice do not handle ptr-metadata for generic types. Consider using monomorphized \
             LLBC."
      (* Otherwise, fetching ptr-metadata from a non-DST simply results in `()`
       When a type is fully resolved and it is not `Eurydice::DstRef`, we can be confident that it is not a DST. *)
      | _ -> K.with_type TUnit K.EUnit
    end
  | PlaceProjection (sub_place, pe) -> begin
      (* Can't evaluate this here because of the special case for DSTs. *)
      let sub_e = lazy (expression_of_place env sub_place) in
      let ( !* ) = Lazy.force in
      (* L.log "AstOfLlbc" "e=%a\nty=%s\npe=%s\n" pexpr sub_e (C.show_ty sub_place.ty) *)
      (*   (C.show_projection_elem pe); *)
      match pe, sub_place, sub_place.ty with
      (* slices simply cannot be dereferenced into places which have unknown size.
         They are supposed to be reborrowed again directly after the deref which is handled in expression_of_rvalue *)
      | C.Deref, _, TRef (_, TSlice _, _) | C.Deref, _, TRawPtr (TSlice _, _) -> assert false
      | ( C.Deref,
          _,
          (TRawPtr _ | TRef _ | TAdt { id = TBuiltin TBox; generics = { types = [ _ ]; _ } }) ) ->
          (* All types represented as a pointer at run-time, compiled to a C pointer *)
          begin
            match !*sub_e.K.typ with
            | TBuf (t_pointee, _) ->
                let const =
                  match sub_place.ty with
                  | TRef (_, _, k) -> const_of_ref_kind k
                  | _ -> false
                in
                Krml.Helpers.(mk_deref ~const t_pointee !*sub_e.K.node)
            | t ->
                L.log "AstOfLlbc" "UNHANDLED DEREFERENCE\ne=%a\nt=%a\nty=%s\npe=%s\n" pexpr !*sub_e
                  ptyp t (C.show_ty sub_place.ty) (C.show_projection_elem pe);
                failwith "unhandled dereference"
          end
      | ( Field (ProjAdt (typ_id, None), field_id),
          { kind = PlaceProjection (sub_place, C.Deref); _ },
          C.TAdt _ ) ->
          let field_name = lookup_field env typ_id field_id in
          let sub_e = expression_of_place env sub_place in
          let place_typ = typ_of_ty env p.ty in
          let const =
            match sub_place.ty with
            | TRef (_, _, k) -> const_of_ref_kind k
            | _ -> false
          in
          begin
            match sub_e.K.typ with
            | K.TApp (dst_ref_hd, [ dst_t; _meta ]) when is_dst_ref dst_ref_hd ->
                (* getting field from a fat pointer of DST  *)
                (* XXX need to adjust *)
                K.with_type place_typ (K.EField (mk_dst_deref env dst_t sub_e, field_name))
            | _ ->
                (* Same as below *)
                K.with_type place_typ
                  (K.EField
                     ( Krml.Helpers.(
                         mk_deref ~const
                           (Krml.Helpers.assert_tbuf_or_tarray sub_e.K.typ)
                           sub_e.K.node),
                       field_name ))
          end
      | Field (ProjAdt (typ_id, variant_id), field_id), _, C.TAdt _ -> begin
          let place_typ = typ_of_ty env p.ty in
          match variant_id with
          | None ->
              let field_name = lookup_field env typ_id field_id in
              K.with_type place_typ (K.EField (!*sub_e, field_name))
          | Some variant_id ->
              let variant = find_nth_variant env typ_id variant_id in
              let field_id = C.FieldId.to_int field_id in
              let field = List.nth variant.fields field_id in
              let b =
                Krml.Helpers.fresh_binder (mk_field_name field.C.field_name field_id) place_typ
              in
              K.with_type place_typ
                K.(
                  EMatch
                    ( Unchecked,
                      !*sub_e,
                      [
                        ( [ b ],
                          with_type !*sub_e.typ
                            (PCons
                               ( variant.C.variant_name,
                                 List.init (List.length variant.fields) (fun i ->
                                     if i = field_id then
                                       with_type place_typ (PBound 0)
                                     else
                                       with_type TAny PWild) )),
                          with_type place_typ (EBound 0) );
                      ] ))
        end
      | ( Field (ProjTuple n, i),
          _,
          C.TAdt { id = _; generics = { types = tys; const_generics = cgs; _ } } ) ->
          let place_typ = typ_of_ty env p.ty in
          assert (cgs = []);
          (* match e with (_, ..., _, x, _, ..., _) -> x *)
          let i = Charon.Types.FieldId.to_int i in
          if List.length tys = 1 then begin
            assert (i = 0);
            (* Normalized one-element tuple *)
            !*sub_e
          end
          else
            let ts =
              match !*sub_e.typ with
              | TTuple ts -> ts
              | _ -> assert false
            in
            assert (List.length ts = n);
            let binders = [ Krml.Helpers.fresh_binder (uu ()) place_typ ] in
            let pattern =
              K.with_type !*sub_e.typ
                (K.PTuple
                   (List.mapi
                      (fun i' t ->
                        K.with_type t
                          (if i = i' then
                             K.PBound 0
                           else
                             PWild))
                      ts))
            in
            let expr = K.with_type place_typ (K.EBound 0) in
            K.with_type place_typ (K.EMatch (Unchecked, !*sub_e, [ binders, pattern, expr ]))
      (* | PlaceProjection () *)
      | _ -> fail "unexpected / ill-typed projection"
    end

let expression_of_place (env : env) (p : C.place) : K.expr =
  L.log "AstOfLlbc" "expression of place: %s" (C.show_place p);
  expression_of_place env p

(* We produce bit-wise operators first, then when the type is of booleans, we
   change into the non-B variants (Rust does not distinguish between bitwise and
   boolean operators) *)
let op_of_unop (op : C.unop) : Krml.Constant.op =
  match op with
  | C.Not -> BNot
  | C.Neg _ -> Neg
  | _ -> failwith (C.show_unop op)

let op_of_binop (op : C.binop) : Krml.Constant.op =
  match op with
  | C.BitXor -> BXor
  | C.BitAnd -> BAnd
  | C.BitOr -> BOr
  | C.Eq -> Eq
  | C.Lt -> Lt
  | C.Le -> Lte
  | C.Ne -> Neq
  | C.Ge -> Gte
  | C.Gt -> Gt
  | C.Div _ -> Div
  | C.Rem _ -> Mod
  | C.Add _ -> Add
  | C.Sub _ -> Sub
  | C.Mul _ -> Mult
  | C.Shl _ -> BShiftL
  | C.Shr _ -> BShiftR
  | _ -> fail "unsupported operator: %s" (C.show_binop op)

let op_128_of_op kind (op : K.op) : K.expr =
  let op_name =
    match op with
    | Add -> "add"
    | Sub -> "sub"
    | Mult -> "mul"
    | Div -> "div"
    | AddW -> "add"
    | SubW -> "sub"
    | MultW -> "mul"
    | DivW -> "div"
    | Mod -> "mod"
    | BShiftL -> "shl"
    | BShiftR -> "shr"
    | BAnd -> "band"
    | BOr -> "bor"
    | BXor -> "bxor"
    | Eq -> "eq"
    | Neq -> "neq"
    | Lt -> "lt"
    | Lte -> "lte"
    | Gt -> "gt"
    | Gte -> "gte"
    | Neg -> "neg"
    | BNot -> "bnot"
    | _ -> failwith "Unsupported operation for uint128"
  in
  Builtin.get_128_op (kind, op_name)

let mk_op_app (op : K.op) (first : K.expr) (rest : K.expr list) : K.expr =
  (* For 128-bit integers, the case is different: convert the operator & match the case here *)
  let op, ret_t =
    if first.typ = Builtin.int128_t || first.typ = Builtin.uint128_t then
      let op =
        if first.typ = Builtin.int128_t then
          op_128_of_op "i" op
        else
          op_128_of_op "u" op
      in
      let ret_t, _ = Krml.Helpers.flatten_arrow op.typ in
      op, ret_t
    else
      (* Otherwise, simply the normal case *)
      let op =
        if first.typ = K.TBool then
          match op with
          | BNot -> Krml.Constant.Not
          | BAnd -> And
          | BOr -> Or
          | BXor -> Xor
          | op -> op
        else
          op
      in
      let op_t = Krml.Helpers.type_of_op op first.typ in
      let op = K.(with_type op_t (EOp (op, first.typ))) in
      let ret_t, _ = Krml.Helpers.flatten_arrow op_t in
      op, ret_t
  in
  (* Rust is super lenient regarding the type of shift operators, we impose u32 -- see
     https://doc.rust-lang.org/std/ops/trait.Shl.html
  *)
  (* Additionally, if the op is `shift` (BShiftL/R for usual, (u)int128_shl/r for 128 bits)
    then the `rest` should be with a single element of type `uint32_t`
    if it is not, turn to type casting. *)
  (* Helper functions for this process *)
  let is_128_bit_shift_lident lident =
    [ Krml.Constant.BShiftL; BShiftR ]
    |> List.concat_map (fun op -> [ op_128_of_op "i" op; op_128_of_op "u" op ])
    |> List.map (fun (x : K.expr) -> Krml.Helpers.assert_elid x.K.node)
    |> List.mem lident
  in
  let modify_rest : K.expr list -> K.expr list = function
    | [ e2 ] -> begin
        match e2.node with
        | EConstant (_, s) ->
            let i = int_of_string s in
            assert (i >= 0);
            [ Krml.Helpers.mk_uint32 i ]
        | _ -> [ K.(with_type (TInt UInt32) (ECast (e2, TInt UInt32))) ]
      end
    | _ ->
        failwith
          "Invalid call to binary operator `shiftl` or `shiftr` -- the number of operands is not 2"
  in
  (* Modify here *)
  let rest =
    match op.node with
    | EOp (BShiftL, _) | EOp (BShiftR, _) -> modify_rest rest
    | EQualified lident when is_128_bit_shift_lident lident -> modify_rest rest
    | _ -> rest
  in
  K.(with_type ret_t (EApp (op, first :: rest)))

let addrof ~const (e : K.expr) = K.(with_type (TBuf (e.typ, const)) (EAddrOf e))

(** Handling trait clauses as dictionaries *)

(* There are two ways that we skip synthesis of trait methods in function calls. The first one is if
   a trait declaration is blocklisted. This happens if the trait has built-in support (e.g.
   FnMut), or if the trait relies on unsupported features (e.g. provided methods,
   used by Iterator's chunk_next, for instance; or associated types; or parent
   clauses). The second way we skip trait methods (further down) is if the
   function is a known builtin implementation. *)
let blocklisted_trait_decls =
  [
    (* These don't have methods *)
    "core::marker::Sized";
    "core::marker::MetaSized";
    "core::marker::PointeeSized";
    "core::marker::Send";
    "core::marker::Sync";
    "core::marker::Tuple";
    "core::marker::Copy";
    (* The traits below *should* be handled properly ASAP. But for now, we have specific *instances*
       of those trait methods in the builtin lookup table, which we then implement by hand with
       macros. *)
    "core::iter::traits::iterator::Iterator";
    "core::iter::range::Step";
    (* TODO: figure out what to do with those *)
    "core::clone::Clone";
    (* TODO: these ones carry the drop_in_place code, but sometimes there's no
       explicit impl (because it's trivial e.g. for usize) which is tricky. *)
    "core::marker::Destruct";
    "core::fmt::Debug";
    "core::ptr::metadata::Thin";
  ]

(* Interpret a Rust function type, with trait bounds, into the krml Ast, providing:
   - the type scheme (fields may be zero)
   - the cg types, which only contains the original Rust const generic variables
   - the argument types, prefixed by the dictionary-style passing of trait clause methods
   - the return type
   - whether the function is builtin, or not. *)
type lookup_result = {
  ts : K.type_scheme; (* just for a sanity check *)
  cg_types : K.typ list;
  arg_types : K.typ list;
  ret_type : K.typ;
  is_known_builtin : bool;
}

let maybe_ts ts t =
  if ts.K.n <> 0 || ts.n_cgs <> 0 then
    K.TPoly (ts, t)
  else
    t

(* For a given function, a (flat) list of all the trait methods that are
   transitively, possibly called by this function, based on the trait bounds in
   its signature.

   Using tests/where_clauses_simple as an example.

   fn double<T: Ops + Copy, U: Ops+Copy> (...)

   this gets desugared to fn double<T,U> where
     T: Ops,      <-- ClauseId 0 (required_methods: add, of_u32)
     T: Copy,     <-- ClauseId 1 (builtin, so neither required nor provided methods)
     U: Ops,      <-- ClauseId 2 (required_methods: add, of_u32)
     U: Copy,     <-- ClauseId 3 (builtin, so neither required nor provided methods)

   the types we obtain by looking up the trait declaration have Self as 0
   (DeBruijn).

   When building a function declaration, this synthesizes all the extra binders
   required for trait methods (passed as function pointers). Assumes type
   variables have been suitably bound in the environment.
*)
let rec mk_clause_binders_and_args env ?depth ?clause_ref (trait_clauses : C.trait_param list) :
    (var_id * K.typ) list =
  let depth = Option.value ~default:"" depth in
  List.concat_map
    (fun tc ->
      let {
        C.clause_id;
        trait = { binder_value = { id = trait_decl_id; generics = trait_generics }; _ };
        _;
      } =
        tc
      in
      let trait_decl = env.get_nth_trait_decl trait_decl_id in
      (* Every item inside the `trait_decl` may refer to generic params of the
         trait. To get items that are valid to return outside of the scope of
         the trait, we must substitute them with the given generics. We should
         in principle substitute everything but we currently don't. This will
         likely be a source of bugs. *)
      let subst =
        Charon.Substitute.make_subst_from_generics trait_decl.generics trait_generics Self
      in
      let substitute_visitor = Charon.Substitute.st_substitute_visitor in

      let name = string_of_name env trait_decl.item_meta.name in
      let clause_ref : C.trait_ref =
        Option.value
          ~default:C.{ kind = C.Clause (Free clause_id); trait_decl_ref = tc.trait }
          clause_ref
      in

      if List.mem name blocklisted_trait_decls then
        []
      else begin
        (* FYI, some clauses like Copy have neither required nor provided methods. *)
        L.log "TraitClauses"
          "%sclause decl %s\n\
          \  id %d:\n\
          \  decl_generics.types are %s\n\
          \  decl_generics.const_generics are %s\n\
          \  methods: %d\n"
          depth name
          (C.TraitClauseId.to_int clause_id)
          (String.concat " ++ " (List.map C.show_ty trait_generics.C.types))
          (String.concat " ++ " (List.map C.show_constant_expr trait_generics.C.const_generics))
          (C.TraitMethodId.Map.cardinal trait_decl.C.methods);

        (* 1. Associated constants *)
        List.map
          (fun (const : C.trait_assoc_const) ->
            let trait_name = trait_decl.C.item_meta.name in
            let pretty_name = string_of_name env trait_name ^ "_" ^ const.C.name in
            let t = substitute_visitor#visit_ty subst const.C.ty in
            let t = typ_of_ty env t in
            ( TraitClauseConstant
                { item_name = const.C.name; pretty_name; clause_id = clause_ref.kind },
              t ))
          trait_decl.C.consts
        (* 2. Trait methods *)
        @ List.map
            (fun ((method_id, mthd) : _ * C.trait_method C.binder) ->
              let item_name = mthd.C.binder_value.C.name in
              let trait_name = trait_decl.C.item_meta.name in
              let pretty_name = string_of_name env trait_name ^ "_" ^ item_name in

              (* Ask charon for the properly bound method signature. *)
              let bound_method_sig : C.fun_sig C.binder C.item_binder =
                Option.get (Charon.Substitute.lookup_method_sig env.crate trait_decl_id method_id)
              in
              (* First we substitute the trait generics. *)
              let bound_method_sig : C.fun_sig C.binder =
                Charon.Substitute.apply_args_to_item_binder clause_ref.kind trait_generics
                  (substitute_visitor#visit_binder substitute_visitor#visit_fun_sig)
                  bound_method_sig
              in

              (* We then construct a polymorphic signature for this method.
                 Its generics are the method generics (the ones in the binder).
                 *)
              let method_sig =
                Charon.Substitute.(
                  (* Variables bound in the inner binder are `Bound`, which
                     eurydice doesn't handle. We therefore make them all `Free`
                     variables, shifting indices to avoid overlap with existing
                     in-scope variables. *)
                  let ambient_ts =
                    { K.n = List.length env.type_binders; K.n_cgs = List.length env.cg_binders }
                  in
                  let shift_ty_var varid =
                    C.TypeVarId.of_int (C.TypeVarId.to_int varid + ambient_ts.K.n)
                  in
                  let shift_cg_var varid =
                    C.ConstGenericVarId.of_int
                      (C.ConstGenericVarId.to_int varid + ambient_ts.K.n_cgs)
                  in
                  (* Replace bound variables with free variables that don't
                     overlap with existing ones. *)
                  let subst =
                    subst_remove_binder_zero
                      {
                        empty_free_sb_subst with
                        ty_sb_subst =
                          (fun varid -> empty_free_sb_subst.ty_sb_subst (shift_ty_var varid));
                        cg_sb_subst =
                          (fun varid -> empty_free_sb_subst.cg_sb_subst (shift_cg_var varid));
                      }
                  in

                  let signature =
                    st_substitute_visitor#visit_fun_sig subst bound_method_sig.binder_value
                  in
                  (* Gotta shift the params too, as trait clause may refer to bound types. *)
                  let method_params =
                    st_substitute_visitor#visit_generic_params subst bound_method_sig.binder_params
                  in
                  (* Finally, update the parameters so they use the new, shifted indices. *)
                  let method_params =
                    {
                      method_params with
                      types =
                        List.map
                          (fun (var : C.type_param) ->
                            { var with C.index = shift_ty_var var.C.index })
                          method_params.types;
                      const_generics =
                        List.map
                          (fun (var : C.const_generic_param) ->
                            { var with C.index = shift_cg_var var.C.index })
                          method_params.const_generics;
                    }
                  in
                  { C.item_binder_params = method_params; item_binder_value = signature })
              in
              L.log "TraitClauses" "%s computed method signature %s::%s:\n%s" depth name item_name
                (Charon.Print.fun_sig_to_string env.format_env "" " " method_sig);
              let ts, t = typ_of_signature env method_sig in
              let t = maybe_ts ts t in
              ( TraitClauseMethod
                  { method_id; item_name; pretty_name; clause_id = clause_ref.kind; ts },
                t ))
            (C.TraitMethodId.Map.to_list trait_decl.C.methods)
        (* 1 + 2, recursively, for parent traits *)
        @ List.concat_map
            (fun (parent_clause : C.trait_param) ->
              (* Make the clause valid outside the scope of the trait decl. *)
              let parent_clause = substitute_visitor#visit_trait_param subst parent_clause in
              (* Mapping of the methods of the parent clause *)
              let clause_ref : C.trait_ref =
                {
                  kind = ParentClause (clause_ref, parent_clause.clause_id);
                  trait_decl_ref = parent_clause.trait;
                }
              in
              mk_clause_binders_and_args env ~depth:(depth ^ "--") ~clause_ref [ parent_clause ])
            trait_decl.C.implied_clauses
      end)
    trait_clauses

and lookup_signature env depth (signature : C.bound_fun_sig) : lookup_result =
  let {
    C.item_binder_params = { types = type_params; const_generics; trait_clauses; _ };
    item_binder_value = { C.inputs; output; _ };
  } =
    signature
  in
  L.log "Calls" "%s# Lookup Signature\n%s--> args: %s, ret: %s\n" depth depth
    (String.concat " ++ " (List.map (Charon.Print.ty_to_string env.format_env) inputs))
    (Charon.Print.ty_to_string env.format_env output);
  L.log "Calls" "%sType parameters for this signature: %s\n" depth
    (String.concat " ++ " (List.map Charon.Print.type_param_to_string type_params));
  let env = push_cg_binders env const_generics in
  let env = push_type_binders env type_params in

  let clause_binders = mk_clause_binders_and_args env trait_clauses in
  debug_trait_clause_mapping env clause_binders;
  let clause_ts = List.map snd clause_binders in

  {
    ts = { n = List.length type_params; n_cgs = List.length const_generics };
    cg_types = List.map (fun (v : C.const_generic_param) -> typ_of_ty env v.ty) const_generics;
    arg_types =
      (clause_ts
      @ List.map (typ_of_ty env) inputs
      @
      if inputs = [] then
        [ K.TUnit ]
      else
        []);
    ret_type = typ_of_ty env output;
    is_known_builtin = false;
  }

(* Transforms a lookup result into a usable type, taking into account the fact that the internal Ast
   is ML-style and does not have zero-argument functions. *)
and typ_of_signature env signature =
  let { cg_types = const_generics_ts; arg_types = inputs; ret_type = output; ts; _ } =
    lookup_signature env "" signature
  in

  let adjusted_inputs = const_generics_ts @ inputs in

  let t = Krml.Helpers.fold_arrow adjusted_inputs output in
  ts, t

and debug_trait_clause_mapping env (mapping : (var_id * K.typ) list) =
  if mapping = [] then
    L.log "TraitClauses" "# Debug Mapping\nIn this function, trait clause mapping is empty"
  else
    L.log "TraitClauses"
      "# Debug Mapping\nIn this function, calls to trait bound methods are as follows:";
  List.iter
    (fun (clause_entry, t) ->
      match clause_entry with
      | TraitClauseMethod { clause_id; item_name; ts; _ } ->
          L.log "TraitClauses" "@@@ method name: %s" item_name;
          L.log "TraitClauses" "%s::%s: %a has trait-level %d const generics, %d type vars\n"
            (Charon.Print.trait_ref_kind_to_string env.format_env None clause_id)
            item_name ptyp t ts.K.n_cgs ts.n
      | TraitClauseConstant { clause_id; item_name; _ } ->
          L.log "TraitClauses" "@@@ method name: %s" item_name;
          L.log "TraitClauses" "%s::%s: associated constant %a\n"
            (Charon.Print.trait_ref_kind_to_string env.format_env None clause_id)
            item_name ptyp t
      | _ -> ())
    mapping

(** Compiling function instantiations into krml application nodes. *)

(* First step: produce an expression for the un-instantiated function reference, along with all the
   type information required to build a proper instantiation. The function reference is an expression
   that is either a reference to a variable in scope (trait methods), or to a top-level qualified
   name, which encompasses both externally-defined function (builtins), or regular functions. *)
let lookup_fun (env : env) depth (fn_ptr : C.fn_ptr) : K.expr' * lookup_result =
  let open RustNames in
  let matches p = Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config p fn_ptr in
  let builtin b =
    let { Builtin.name; typ; n_type_args; cg_args; _ } = b in
    let ret_type, arg_types = Krml.Helpers.flatten_arrow typ in
    let ts = { K.n = n_type_args; K.n_cgs = List.length cg_args } in
    K.EQualified name, { ts; arg_types; ret_type; cg_types = cg_args; is_known_builtin = true }
  in
  match List.find_opt (fun (p, _) -> matches p) (known_builtins !Options.no_const) with
  | Some (_, b) -> builtin b
  | None -> (
      let lookup_result_of_fun_id fun_id =
        let decl = env.get_nth_function fun_id in
        let lid = lid_of_name env decl.C.item_meta.name in
        L.log "Calls" "%s--> name: %a" depth plid lid;
        K.EQualified lid, lookup_signature env depth (C.bound_fun_sig_of_decl decl)
      in

      match fn_ptr.kind with
      | FunId (FRegular f) -> lookup_result_of_fun_id f
      | FunId (FBuiltin f) -> fail "unknown builtin function: %s" (C.show_builtin_fun_id f)
      | TraitMethod (trait_ref, method_id, _trait_opaque_signature) -> (
          match trait_ref.kind with
          | TraitImpl { id; _ } ->
              let trait_impl = env.get_nth_trait_impl id in
              let f =
                try C.TraitMethodId.Map.find method_id trait_impl.methods
                with Not_found ->
                  fail "Error looking trait impl: %s%!"
                    (Charon.Print.fn_ptr_to_string env.format_env fn_ptr)
              in
              lookup_result_of_fun_id f.C.binder_value.id
          | (Clause _ | ParentClause _) as tcid ->
              let f, t, sig_info = lookup_clause_method env tcid method_id in
              (* the sig_info is kind of redundant here *)
              let t =
                match t with
                | TPoly (_, t) -> t
                | _ -> t
              in
              let ret_type, arg_types = Krml.Helpers.flatten_arrow t in
              let cg_types, arg_types = Krml.KList.split sig_info.n_cgs arg_types in
              EBound f, { ts = sig_info; cg_types; arg_types; ret_type; is_known_builtin = false }
          | _ ->
              fail "Error looking trait ref: %s%!"
                (Charon.Print.fn_ptr_to_string env.format_env fn_ptr)))

let fn_ptr_is_opaque env (fn_ptr : C.fn_ptr) =
  match fn_ptr.kind with
  | FunId (FRegular id) -> (
      try
        match (env.get_nth_function id).body with
        | StructuredBody _ -> false
        | _ -> true
      with Not_found -> false)
  | _ -> false

(* This is a very core piece of logic that transforms a Rust fn_ptr into a krml AST node that
   contains type application, const generic applications, and application of trait methods to
   implement the dictionary-passing style. *)
let rec expression_of_fn_ptr env depth (fn_ptr : C.fn_ptr) =
  let {
    C.generics = { types = type_args; const_generics = const_generic_args; trait_refs; _ };
    kind;
    _;
  } : C.fn_ptr =
    fn_ptr
  in

  (* We handle any kind of fn_ptr, whether it's a concrete function call, a
     concrete trait implementation method call, or an abstract trait method call
     (e.g. a call to T::f when T is a trait bound in scope). *)
  L.log "Calls" "%sVisiting call: %s" depth (Charon.Print.fn_ptr_to_string env.format_env fn_ptr);
  L.log "Calls" "%s--> %d type_args, %d const_generics, %d trait_refs" depth (List.length type_args)
    (List.length const_generic_args) (List.length trait_refs);

  (* In case this is a call to a trait implementation method, there are two
     levels of applications: the trait-generic arguments (i.e. impl <T: ...> for ...)
     and the method-generic arguments (i.e. fn f<U: ...>). The method appears as
     a top-level function that receives all the arguments for T and U (types,
     const generics, trait references), and when we synthesize a call node, we
     do behave accordingly and provide arguments for both T and U. *)
  let type_args, const_generic_args, trait_refs =
    let generics =
      match kind with
      | TraitMethod ({ kind = TraitImpl { generics; _ }; _ }, _, _) ->
          L.log "Calls" "%s--> this is a trait method" depth;
          generics
      | _ -> C.empty_generic_args
    in
    ( generics.types @ type_args,
      generics.const_generics @ const_generic_args,
      generics.trait_refs @ trait_refs )
  in

  L.log "Calls" "%s--> %d type_args, %d const_generics, %d trait_refs" depth (List.length type_args)
    (List.length const_generic_args) (List.length trait_refs);
  L.log "Calls" "%s--> trait_refs: %s\n" depth
    (String.concat " ++ " (List.map (Charon.Print.trait_ref_to_string env.format_env) trait_refs));
  L.log "Calls" "%s--> pattern: %s" depth (string_of_fn_ptr env fn_ptr);
  L.log "Calls" "%s--> type_args: %s" depth
    (String.concat ", " (List.map (Charon.Print.ty_to_string env.format_env) type_args));

  (* The function itself, along with information about its *signature*. *)
  let f, { ts; arg_types = inputs; ret_type = output; cg_types = cg_inputs; is_known_builtin } =
    lookup_fun env depth fn_ptr
  in
  L.log "Calls" "%s--> %d inputs: %a" depth (List.length inputs) ptyps inputs;
  L.log "Calls" "%s--> is_known_builtin?: %b" depth is_known_builtin;

  (* Translate effective type and cg arguments. *)
  let const_generic_args =
    match f, type_args with
    | EQualified lid, [ _; TRef (_, TArray (_, cg), _); _ ]
      when lid = Builtin.slice_to_ref_array.name ->
        (* Special case, we *do* need to retain the length, which would disappear if we simply did
           typ_of_ty (owing to array decay rules). *)
        [ expression_of_const_generic env cg ]
    | _ -> List.map (expression_of_const_generic env) const_generic_args
  in
  let type_args = List.map (typ_of_ty env) type_args in

  (* Handling trait implementations for generic trait bounds in the callee. We
     synthesize krml expressions that correspond to each one of the trait methods
     that the callee expects. Order matters here. *)
  let fn_ptrs : K.expr list =
    if is_known_builtin then
      (* If this is a known builtin implementation, we do not materialize trait methods, on the
         basis that this is likely something from the standard library that exercises more features
         that we can support, and that since we hand-write it, we don't need this level of precision
         anyhow. *)
      []
    else
      (* MUST have the same structure as mk_clause_binders_and_args *)
      let rec build_trait_ref_mapping depth (trait_refs : C.trait_ref list) =
        List.concat_map
          (fun (trait_ref : C.trait_ref) ->
            let name =
              string_of_name env
                (env.get_nth_trait_decl trait_ref.trait_decl_ref.binder_value.id).item_meta.name
            in
            L.log "Calls" "%s--> trait_ref %s: %s\n" depth name (C.show_trait_ref trait_ref);

            match trait_ref.kind with
            | _ when List.mem name blocklisted_trait_decls ->
                (* Trait not supported -- don't synthesize arguments *)
                []
            | TraitImpl { id = impl_id; generics = _generics } ->
                (* Call-site has resolved trait clauses into a concrete trait implementation. *)
                let trait_impl : C.trait_impl = env.get_nth_trait_impl impl_id in

                (* This must be in agreement, and in the same order as mk_clause_binders_and_args *)
                List.map
                  (fun ((_item_name, { C.id; generics }) : _ * C.global_decl_ref) ->
                    if
                      not
                        (generics.types = [] && generics.const_generics = []
                       && generics.trait_refs = [])
                    then
                      failwith "TODO: polymorphic globals";
                    let global = env.get_nth_global id in
                    K.with_type (typ_of_ty env global.ty)
                      (K.EQualified (lid_of_name env global.item_meta.name)))
                  trait_impl.consts
                @ List.map
                    (fun ((method_id, bound_fn) : _ * C.fun_decl_ref C.binder) ->
                      let fun_decl_id = bound_fn.C.binder_value.C.id in
                      let fn_ptr : C.fn_ptr =
                        {
                          kind = TraitMethod (trait_ref, method_id, fun_decl_id);
                          generics = Charon.TypesUtils.empty_generic_args;
                        }
                      in
                      let fn_ptr = fst3 (expression_of_fn_ptr env (depth ^ "  ") fn_ptr) in
                      fn_ptr)
                    (C.TraitMethodId.Map.to_list trait_impl.methods)
                @ build_trait_ref_mapping ("  " ^ depth)
                    (let subst =
                       Charon.Substitute.make_subst_from_generics trait_impl.generics _generics Self
                     in
                     (*_generics.trait_refs*)
                     List.map
                       (Charon.Substitute.st_substitute_visitor#visit_trait_ref subst)
                       trait_impl.implied_trait_refs)
            | Clause _ as clause_id ->
                (* Caller it itself polymorphic and refers to one of its own clauses to synthesize
                   the clause arguments at call-site. We must pass whatever is relevant for this
                   clause, *transitively* (this means all the reachable parents). *)
                let rec relevant = function
                  | C.ParentClause (tref', _) -> relevant tref'.kind
                  | clause_id' -> clause_id = clause_id'
                in
                List.rev
                  (Krml.KList.filter_mapi
                     (fun i (var, t) ->
                       match var with
                       | TraitClauseMethod { clause_id = clause_id'; _ }
                       | TraitClauseConstant { clause_id = clause_id'; _ }
                         when relevant clause_id' -> Some K.(with_type t (EBound i))
                       | _ -> None)
                     env.binders)
            | ParentClause (tref, clause_id) ->
                let decl_id = tref.trait_decl_ref.binder_value.id in
                let trait_decl = env.get_nth_trait_decl decl_id in
                let name = string_of_name env trait_decl.item_meta.name in
                let clause_id = C.TraitClauseId.to_int clause_id in
                let parent_clause = List.nth trait_decl.implied_clauses clause_id in
                let parent_clause_decl =
                  env.get_nth_trait_decl parent_clause.trait.binder_value.id
                in
                let parent_name = string_of_name env parent_clause_decl.item_meta.name in
                Krml.KPrint.bprintf "looking up parent clause #%d of decl=%s = %s\n" clause_id name
                  parent_name;
                if List.mem parent_name blocklisted_trait_decls then
                  []
                else
                  failwith
                    ("Don't know how to resolve trait_ref above (2): "
                    ^ Charon.Print.trait_ref_to_string env.format_env trait_ref)
            | _ ->
                failwith
                  ("Don't know how to resolve trait_ref above (2): "
                  ^ Charon.Print.trait_ref_to_string env.format_env trait_ref))
          trait_refs
      in
      build_trait_ref_mapping depth trait_refs
  in
  L.log "Calls" "%s--> trait method impls: %d" depth (List.length fn_ptrs);

  (* This needs to match what is done in the FunGroup case (i.e. when we extract
     a definition). There are two behaviors depending on whether the function is
     builtin or not. *)
  let inputs =
    if inputs = [] then
      [ K.TUnit ]
    else
      inputs
  in

  (* From here on, this is only krml logic, which is about building
     properly-annotated internal nodes that take care of instantiating generic
     type schemes, dealing with type applications, const genericss, etc.
     followed by the application of trait methods (in the special TApp node). *)
  let t_unapplied = maybe_ts ts (Krml.Helpers.fold_arrow (cg_inputs @ inputs) output) in
  let offset = List.length env.binders - List.length env.cg_binders in
  L.log "Calls" "%s--> t_unapplied: %a" depth ptyp t_unapplied;
  L.log "Calls" "%s--> inputs: %a" depth ptyps inputs;
  L.log "Calls" "%s--> const_generic_args: %a (offset: %d)" depth pexprs const_generic_args offset;
  L.log "Calls" "%s--> %d fn_ptrs: %a (offset: %d)" depth (List.length fn_ptrs)
    (fun k e ->
      List.iter
        (fun e ->
          pexpr k e;
          Buffer.add_string k ": ";
          ptyp k e.typ)
        e)
    fn_ptrs offset;

  let t_applied =
    match t_unapplied with
    | TPoly ({ n; n_cgs }, t) ->
        let ts =
          { K.n = n - List.length type_args; n_cgs = n_cgs - List.length const_generic_args }
        in
        if ts.n > 0 || ts.n_cgs > 0 then
          K.TPoly (ts, t)
        else
          t
    | t -> t
  in
  L.log "Calls" "%s--> t_applied (1): %a" depth ptyp t_applied;
  let t_applied =
    Krml.DeBruijn.(subst_tn type_args (subst_ctn offset const_generic_args t_applied))
  in
  L.log "Calls" "%s--> t_applied (2): %a" depth ptyp t_applied;
  let t_applied =
    match t_applied with
    | TPoly (ts, t) ->
        assert (fn_ptrs = []);
        let ret, args = Krml.Helpers.flatten_arrow t in
        let _, args = Krml.KList.split (List.length const_generic_args) args in
        K.TPoly (ts, Krml.Helpers.fold_arrow args ret)
    | t ->
        let ret, args = Krml.Helpers.flatten_arrow t in
        if List.length const_generic_args + List.length fn_ptrs > List.length args then
          L.log "Calls" "ERROR in %s" (Charon.Print.fn_ptr_to_string env.format_env fn_ptr);
        let _, args =
          Krml.KList.split (List.length const_generic_args + List.length fn_ptrs) args
        in
        Krml.Helpers.fold_arrow args ret
  in
  L.log "Calls" "%s--> t_applied: %a" depth ptyp t_applied;
  let hd =
    let hd = K.with_type t_unapplied f in
    if type_args <> [] || const_generic_args <> [] || fn_ptrs <> [] then
      K.with_type t_applied (K.ETApp (hd, const_generic_args, fn_ptrs, type_args))
    else
      hd
  in
  L.log "Calls" "%s--> hd: %a" depth pexpr hd;
  ( hd,
    is_known_builtin,
    match t_applied with
    | TPoly (ts, t) -> K.TPoly (ts, fst (Krml.Helpers.flatten_arrow t))
    | t -> fst (Krml.Helpers.flatten_arrow t) )

let expression_of_fn_ptr env (fn_ptr : C.fn_ptr) = expression_of_fn_ptr env "" fn_ptr

let global_is_const env id =
  match (env.get_nth_global id).global_kind with
  | NamedConst | AnonConst -> true
  | Static -> false

let expression_of_operand (env : env) (op : C.operand) : K.expr =
  match op with
  | Copy ({ kind = PlaceGlobal { id; _ }; _ } as p) when global_is_const env id ->
      (* No need to copy a const since by definition it cannot be modified *)
      expression_of_place env p
  | Copy p -> expression_of_place env p
  | Move p -> expression_of_place env p
  | Constant { kind = CLiteral l; _ } -> expression_of_literal env l
  | Constant { kind = CVar var; _ } -> expression_of_cg_var_id env (C.expect_free_var var)
  | Constant { kind = CFnDef fn_ptr; _ } ->
      let e, _, _ = expression_of_fn_ptr env fn_ptr in
      e
  | Constant { kind = CTraitConst (({ C.kind; _ } as trait_ref), name); _ } -> begin
      (* Logic similar to lookup_fun *)
      match kind with
      | Clause _ | ParentClause _ ->
          let i, t = lookup_clause_constant env kind name in
          K.(with_type t (EBound i))
      | TraitImpl { id; _ } ->
          let trait = env.get_nth_trait_impl id in
          let global =
            try List.assoc name trait.consts
            with Not_found ->
              fail "Error looking trait impl: %s %s%!"
                (Charon.Print.trait_ref_to_string env.format_env trait_ref)
                name
          in
          let global = env.get_nth_global global.C.id in
          K.with_type (typ_of_ty env global.ty)
            (K.EQualified (lid_of_name env global.item_meta.name))
      | _ ->
          fail "expression_of_operand Constant: %s"
            (Charon.Print.operand_to_string env.format_env op)
    end
  | Constant { kind = CAdt _; ty } when Charon.TypesUtils.ty_is_unit ty -> K.with_type TUnit K.EUnit
  | Constant _ ->
      fail "expression_of_operand: %s" (Charon.Print.operand_to_string env.format_env op)

let is_str env var_id =
  match lookup_with_original_type env var_id with
  | _, _, TRef (_, TAdt { id = TBuiltin TStr; generics = { types = []; _ } }, _) -> true
  | _ -> false

let is_box_place (p : C.place) =
  match p.ty with
  | C.TAdt { id = TBuiltin TBox; _ } -> true
  | _ -> false

(* returns either a regular naked C pointer, or a fat pointer in the case of DSTs (i.e. with non-empty metadata) *)
let mk_reference ~const (e : K.expr) (metadata : K.expr) : K.expr =
  match metadata.typ with
  (* When it is unit, it means there is no metadata, simply take the address *)
  | K.TUnit -> addrof ~const e
  | _ -> (
      match e.typ with
      | TApp (lid, [ t ]) when lid = Builtin.derefed_slice ->
          (* The special "base case" of DSTs: slice<T>
          where we have to cast [derefed_slice<T>] into [T*] for the .ptr field in the fat pointer  *)
          let ptr = K.(with_type (TBuf (t, const)) (ECast (e, TBuf (t, const)))) in
          K.(
            with_type
              (Builtin.mk_dst_ref ~const t metadata.typ)
              (EFlat [ Some "ptr", ptr; Some "meta", metadata ]))
      | _ ->
          K.(
            with_type
              (Builtin.mk_dst_ref ~const e.typ metadata.typ)
              (EFlat [ Some "ptr", addrof ~const e; Some "meta", metadata ])))

(* To destruct a DST reference type into its base and metadata types
   I.e., from Eurydice_dst_ref<T, meta> to (T, meta) *)
let destruct_dst_ref_typ t =
  match t with
  | K.TApp (dst_ref_hd, [ t_base; t_meta ]) when is_dst_ref dst_ref_hd -> Some (t_base, t_meta)
  | _ -> None

(* Get the base pointer expression from a DST reference expression
   I.e., from `e : Eurydice_dst_ref<T, meta>` to `e.ptr : T*` *)
let get_dst_ref_base dst_ref =
  match destruct_dst_ref_typ dst_ref.K.typ with
  (* XXX fixme *)
  | Some (base, _) -> Some K.(with_type (TBuf (base, false)) (EField (dst_ref, "ptr")))
  | None -> None

(* Parse the fat pointer Eurydice_dst_ref<T<U>, _> into (T,T<U>),
   where the ignored field `_` must be `usize` as metadata,
   used to handle the unsized cast from &T<V> to &T<U> *)
let destruct_arr_dst_ref t =
  match t with
  | K.TApp (dst_ref_hd, [ (TApp (lid, _) as t_u); _ ]) when is_dst_ref dst_ref_hd -> Some (lid, t_u)
  | _ -> None

(* Reborrows allow going from a mutable slice to an immutable one. *)
let maybe_reborrow_slice t_dst e_src =
  let open K in
  match e_src.typ, t_dst with
  | TApp (hd1, [ t_ptr; t_meta ]), TApp (hd2, _) when is_dst_ref hd1 && is_dst_ref hd2 && hd1 <> hd2
    ->
      let mk e =
        with_type t_dst
          (EFlat
             [
               Some "ptr", with_type (TBuf (t_ptr, true)) (EField (e, "ptr"));
               Some "meta", with_type t_meta (EField (e, "meta"));
             ])
      in
      if Krml.Helpers.is_readonly_c_expression e_src then
        mk e_src
      else
        with_type t_dst
          (ELet
             ( Krml.Helpers.fresh_binder "reborrowed_slice" e_src.typ,
               e_src,
               mk (with_type e_src.typ (EBound 0)) ))
  | _ -> e_src

let expression_of_rvalue (env : env) (p : C.rvalue) expected_ty : K.expr =
  match p with
  | Use op -> expression_of_operand env op
  (* Generally, MIR / current LLBC is guaranteed to apply [Deref] only to places that are
     references or raw pointers, in these cases [&*p] == [p].
     The [Deref] traits types are desugared to function calls to [deref].
     The ONLY exception is when the place is a [Box]. That is, MIR/LLBC might generate [*b]
     where [b] is a [Box]. This refers to taking the value out of the [Box].
     Recall that [Box] is a wrapper of [Unique], which is in turn a wrapper of a [NonNull],
     which is a wrapper of a raw pointer. Hence, [*b] when [b] is a [Box] is equivalent to
     [*(b.0.pointer.pointer)]. This is a compiler magic.

     However, in Eurydice *now*, [Box] types are instantly unboxed to raw pointers, which
     coincides exactly with our current implementation, hence no extra handling is needed.
     In the future however, we might want to handle [Box] types differently, so this is a note
     to ourselves to be careful with this.
     *)
  | RvRef ({ kind = PlaceProjection (p, Deref); _ }, _, _)
  | RawPtr ({ kind = PlaceProjection (p, Deref); _ }, _, _) ->
      (* Notably, this is NOT simply an optimisation, as this represents re-borrowing, and [p] might
         be a reference to DST (fat pointer). *)
      (* This also works for when the case has metadata, simply ignore it *)
      maybe_reborrow_slice (typ_of_ty env expected_ty) (expression_of_place env p)
  | RvRef (p, bk, metadata) ->
      let metadata = expression_of_operand env metadata in
      let e = expression_of_place env p in
      mk_reference ~const:(const_of_borrow_kind bk) e metadata
  | RawPtr (p, rk, metadata) ->
      let metadata = expression_of_operand env metadata in
      let e = expression_of_place env p in
      mk_reference ~const:(const_of_ref_kind rk) e metadata
  | NullaryOp (SizeOf, ty) ->
      let t = typ_of_ty env ty in
      K.(with_type TBool (EApp (Builtin.(expr_of_builtin_t sizeof [ t ]), [])))
  | NullaryOp (AlignOf, ty) ->
      let t = typ_of_ty env ty in
      K.(with_type TBool (EApp (Builtin.(expr_of_builtin_t alignof [ t ]), [])))
  | UnaryOp (Cast (CastScalar (_, dst)), e) ->
      let dst = typ_of_literal_ty env dst in
      K.with_type dst (K.ECast (expression_of_operand env e, dst))
  | UnaryOp (Cast (CastRawPtr (_from, to_)), e) ->
      let dst = typ_of_ty env to_ in
      K.with_type dst (K.ECast (expression_of_operand env e, dst))
  | UnaryOp (Cast (CastTransmute ((TRawPtr _ as _from), (TLiteral (TUInt Usize) as to_))), e) ->
      let dst = typ_of_ty env to_ in
      K.with_type dst (K.ECast (expression_of_operand env e, dst))
  | UnaryOp (Cast (CastFnPtr (TFnDef _from, TFnPtr _to)), e) ->
      (* From FnDef to FnPtr *)
      if Charon.Substitute.lookup_fndef_sig env.crate _from = Some _to then
        expression_of_operand env e
      else
        let dst = typ_of_ty env (TFnPtr _to) in
        K.with_type dst (K.ECast (expression_of_operand env e, dst))
  | UnaryOp (Cast (CastFnPtr (TFnPtr _, TFnPtr _)), e) ->
      (* possible safe fn to unsafe fn, same in C *)
      expression_of_operand env e
  | UnaryOp (Cast (CastUnsize (ty_from, ty_to, meta) as ck), e) ->
      (* DSTs: we support going from &T<S1> to &T<S2> where S1 is sized,  S2 is
         unsized and &T<S2> becomes a fat pointer. The base case is from &T<[U;N]>
         to T<[U]>. See test/more_dst.rs for user-defined DST case. We build this
         coercion by hand, and slightly violate C's strict aliasing rules. *)
      let t_from = typ_of_ty env ty_from and t_to = typ_of_ty env ty_to in
      let e = expression_of_operand env e in
      begin
        match meta, t_from, destruct_arr_dst_ref t_to with
        | MetaLength cg, TBuf (TApp (lid1, _), const), Some (lid2, t_u) when lid1 = lid2 ->
            (* Cast from a struct whose last field is `t data[n]` to a struct whose last field is
             `Eurydice_derefed_slice data` (a.k.a. `char data[]`) *)
            let len = expression_of_const_generic env cg in
            let ptr = K.with_type (TBuf (t_u, const)) (K.ECast (e, TBuf (t_u, const))) in
            Builtin.dst_new ~const ~len ~ptr t_u
        | MetaLength cg, TBuf (K.TCgApp (K.TApp (lid_arr, [ t ]), _), _), _
          when lid_arr = Builtin.arr ->
            (* Cast from Box<[T;N]> (represented as a mut reference to an array) to Box<[T]> (which we
               represent as a slice). See the translation of types. *)
            let len = expression_of_const_generic env cg in
            let const =
              match t_to with
              | K.TApp (dst_ref_hd, _) when dst_ref_hd = Builtin.dst_ref_shared -> true
              | K.TApp (dst_ref_hd, _) when dst_ref_hd = Builtin.dst_ref_mut -> false
              | _ -> assert false
            in
            let array_to_slice =
              RustNames.builtin_of_function
                (if const then
                   Builtin.array_to_slice_func_shared
                 else
                   Builtin.array_to_slice_func_mut)
            in
            let t_without_cg = array_to_slice.typ in
            (* array_to_slice: size_t -> arr -> Eurydice_slice 0 *)
            let array_to_slice = Builtin.(expr_of_builtin array_to_slice) in
            let diff = List.length env.binders - List.length env.cg_binders in
            let array_to_slice =
              K.with_type
                Krml.DeBruijn.(subst_t t 0 (subst_ct diff len 0 t_without_cg))
                (K.ETApp (array_to_slice, [ len ], [], [ t ]))
            in
            K.(with_type (Builtin.mk_slice ~const t) (EApp (array_to_slice, [ e ])))
        | _, _, _ ->
            Krml.KPrint.bprintf "t_to = %a\n" ptyp t_to;
            Krml.KPrint.bprintf "destruct_arr_dst_ref t_to = None? %b\n"
              (destruct_arr_dst_ref t_to = None);
            Krml.Warn.fatal_error "unknown unsize cast: `%s`\nt_to=%a\nt_from=%a"
              (Charon.Print.cast_kind_to_string env.format_env ck)
              ptyp t_to ptyp t_from
      end
  | UnaryOp (Cast (CastConcretize (_from_ty, to_ty)), e) -> (
      (* Concretization cast is a no-op at runtime *)
      let op_e = expression_of_operand env e in
      let typ = typ_of_ty env to_ty in
      match get_dst_ref_base op_e with
      | Some base_ptr -> K.(with_type typ (ECast (base_ptr, typ)))
      | None ->
          failwith
            ("unknown concretize cast: `"
            ^ Charon.Print.cast_kind_to_string env.format_env (CastConcretize (_from_ty, to_ty))
            ^ "`"))
  | UnaryOp (Cast ck, e) ->
      (* Add a simpler case: identity cast is allowed *)
      let is_ident =
        match ck with
        (* Here are `literal_type`s *)
        | C.CastScalar (f, t) -> f = t
        (* The following are `type`s *)
        | C.CastFnPtr (f, t) | C.CastRawPtr (f, t) | C.CastUnsize (f, t, _) | C.CastTransmute (f, t)
          -> f = t
        | C.CastConcretize _ -> false
      in
      if is_ident then
        expression_of_operand env e
      else
        failwith ("unknown cast: `" ^ Charon.Print.cast_kind_to_string env.format_env ck ^ "`")
  (* | UnaryOp (PtrMetadata, e) ->
    let e = expression_of_operand env e in begin
    match e.typ with
    | TApp (lid, [ _; meta_ty ]) when lid = Builtin.dst_ref ->
      K.(with_type meta_ty (EField (e, "meta")))
    (* In cases like `PtrMetadata(T)` when `T` is a type variable or some types with unresolved type variable,
       We cannot tell the correct metadata type from it until fully monomorphized.
       But we can surely rely on monomorphized LLBC, and we ignore handling such cases in Eurydice. *)
    | ty when has_unresolved_generic ty ->
      failwith "Eurydice do not handle ptr-metadata for generic types. Consider using monomorphized LLBC."
    (* Otherwise, fetching ptr-metadata from a non-DST simply results in `()`
       When a type is fully resolved and it is not `Eurydice::DstRef`, we can be confident that it is not a DST. *)
    | _ -> K.with_type TUnit K.EUnit
    end *)
  | UnaryOp (op, o1) -> mk_op_app (op_of_unop op) (expression_of_operand env o1) []
  | BinaryOp (op, o1, o2) ->
      mk_op_app (op_of_binop op) (expression_of_operand env o1) [ expression_of_operand env o2 ]
  | Discriminant sub_p ->
      let e = expression_of_place env sub_p in
      let expected_t = typ_of_ty env expected_ty in
      K.(
        with_type expected_t
          (EApp (Builtin.(expr_of_builtin_t discriminant) [ e.typ; expected_t ], [ e ])))
  | Aggregate (AggregatedAdt ({ id = TTuple; _ }, _, None), ops) -> begin
      match ops with
      | [] -> K.with_type TUnit K.EUnit
      | [ op ] -> expression_of_operand env op
      | _ ->
          let ops = List.map (expression_of_operand env) ops in
          let ts = List.map (fun x -> x.K.typ) ops in
          K.with_type (TTuple ts) (K.ETuple ops)
    end
  | Aggregate
      ( AggregatedAdt
          ( { id = TAdtId typ_id; generics = { types = typ_args; const_generics; _ } },
            variant_id,
            None ),
        args ) ->
      let { C.item_meta; kind; _ } = env.get_nth_type typ_id in
      let name = item_meta.name in
      let typ_lid = lid_of_name env name in
      let typ_args = List.map (typ_of_ty env) typ_args in
      let cg_args = List.map (cg_of_const_generic env) const_generics in
      let t = K.fold_tapp (typ_lid, typ_args, cg_args) in
      let args = List.map (expression_of_operand env) args in
      begin
        match variant_id with
        | Some variant_id ->
            let variant_id = (find_nth_variant env typ_id variant_id).variant_name in
            if is_enum env typ_id then
              K.with_type t (K.EEnum (mk_enum_case typ_lid variant_id))
            else
              K.with_type t (K.ECons (variant_id, args))
        | None ->
            let fields =
              match kind with
              | Struct fields -> fields
              | Enum _ -> failwith "TODO: Enum"
              | Union _ -> failwith "TODO: Union"
              | Opaque -> failwith "TODO: Opaque"
              | Alias _ -> failwith "TODO: Alias"
              | TDeclError _ -> failwith "TODO: TDeclError"
            in
            K.with_type t
              (K.EFlat
                 (List.mapi
                    (fun i (f, a) -> Some (ensure_named i f.C.field_name), a)
                    (List.combine fields args)))
      end
  | Aggregate (AggregatedAdt ({ id = TBuiltin _; _ }, _, _), _) ->
      failwith "unsupported: AggregatedAdt / TAssume"
  | Aggregate (AggregatedArray (t, cg), ops) ->
      let ty = typ_of_ty env t in
      let typ_arr = typ_of_struct_arr env t cg in
      begin
        match ops with
        | [] ->
            let empty_array =
              K.with_type
                Krml.DeBruijn.(subst_t ty 0 Builtin.empty_array.typ)
                (K.ETApp (Builtin.(expr_of_builtin empty_array), [], [], [ ty ]))
            in
            K.with_type typ_arr (K.EApp (empty_array, [ K.with_type ty K.EAny ]))
            (* a dummy arg is needed to pass the checker *)
        | _ ->
            let array_expr =
              K.with_type
                (TArray (typ_of_ty env t, constant_of_scalar_value (assert_cg_scalar cg)))
                (K.EBufCreateL (Stack, List.map (expression_of_operand env) ops))
            in
            K.with_type typ_arr (mk_expr_arr_struct array_expr)
      end
  | rvalue ->
      failwith ("unsupported rvalue: `" ^ Charon.Print.rvalue_to_string env.format_env rvalue ^ "`")

let expression_of_assertion (env : env) ({ cond; expected; _ } : C.assertion) : K.expr =
  let cond =
    if not expected then
      expression_of_operand env cond
    else
      Krml.Helpers.mk_not (expression_of_operand env cond)
  in
  K.(
    with_type TAny
      (EIfThenElse (cond, with_type TAny (EAbort (None, Some "assert failure")), Krml.Helpers.eunit)))

let lesser t1 t2 =
  if t1 = K.TAny then
    t2
  else if t2 = K.TAny then
    t2
  else if t1 <> t2 then
    fail "lesser t1=%a t2=%a" ptyp t1 ptyp t2
  else
    t1

(* A `fn` pointer, which does not have trait bounds, and cannot be partially applied. This is a
   much simplified version of expression_of_fn_ptr. *)
let expression_of_fn_op_dynamic (env : env) ({ func; args; dest } : C.call) =
  let fHd =
    match func with
    | C.FnOpDynamic op -> expression_of_operand env op
    | _otw ->
        failwith @@ "Internal error: the given call is not to `FnOpMove`."
        ^ "The function `expression_of_fn_op_dynamic` handles only call to `FnOpMove`."
  in
  let lhs = expression_of_place env dest in
  let args = List.map (expression_of_operand env) args in
  let args =
    if args = [] then
      [ Krml.Helpers.eunit ]
    else
      args
  in
  (* Asserting that this is not a partial application *)
  let ret_t, args_t = Krml.Helpers.flatten_arrow fHd.typ in
  assert (List.length args_t = List.length args);
  let rhs = K.with_type ret_t @@ K.EApp (fHd, args) in
  Krml.Helpers.with_unit @@ K.EAssign (lhs, rhs)

(** Handles only the `SwitchInt` for 128-bit integers. Turn the switch expression into if-then-else
    expressions. This is to work around the Krml integer type limitations. *)
let rec expression_of_switch_128bits env ret_var scrutinee branches default : K.expr =
  let scrutinee = expression_of_operand env scrutinee in
  let else_branch = expression_of_block env ret_var default in
  let folder (svs, stmt) else_branch =
    (* [i1, i2, ..., in] ==> scrutinee == i1 || scrutinee == i2 || ... || scrutinee == in *)
    let guard =
      let make_eq sv = mk_op_app Eq scrutinee [ expression_of_scalar_value sv ] in
      List.map make_eq svs |> function
      | [] -> Krml.Helpers.etrue
      | x :: lst -> List.fold_left Krml.Helpers.mk_or x lst
    in
    (* the "then" body of the if-then-else expression *)
    let body = expression_of_block env ret_var stmt in
    (* combines the types: compare each branch and then generate the correct type *)
    let typ = lesser body.K.typ else_branch.K.typ in
    K.(with_type typ (EIfThenElse (guard, body, else_branch)))
  in
  List.fold_right folder branches else_branch

and expression_of_statement_kind (env : env) (ret_var : C.local_id) (s : C.statement_kind) : K.expr
    =
  match s with
  | Assign (p, rv) ->
      let expected_ty = p.ty in
      let p = expression_of_place env p in
      let rv = expression_of_rvalue env rv expected_ty in
      K.(with_type TUnit (EAssign (p, rv)))
  | SetDiscriminant (_, _) -> failwith "C.SetDiscriminant"
  | StorageLive _ -> Krml.Helpers.eunit
  | StorageDead _ -> Krml.Helpers.eunit
  | PlaceMention p ->
      let p = expression_of_place env p in
      K.(with_type TUnit (EIgnore p))
  | Drop (p, _, _) ->
      let _ = expression_of_place env p in
      begin
        match p.ty with
        (* doesn't do the right thing yet, need to understand why there are
           several drops per variable *)
        (* | C.Adt (Builtin Vec, _) when false -> *)
        (*     (1* p is a vec t *1) *)
        (*     let t = match p.typ with TApp ((["Eurydice"], "vec"), [ t ]) -> t | _ -> assert false in *)
        (*     Krml.Helpers.(with_unit K.(EApp ( *)
        (*       with_type (Krml.DeBruijn.subst_tn [ t ] Builtin.vec_drop.typ) (ETApp ( *)
        (*         with_type Builtin.vec_drop.typ (EQualified Builtin.vec_drop.name), *)
        (*         [ t ])), *)
        (*       [ p ]))) *)
        | _ -> Krml.Helpers.eunit
      end
  | Assert (a, _on_failure) -> expression_of_assertion env a
  | Call
      {
        func =
          FnOpRegular
            {
              kind = FunId (FBuiltin ArrayRepeat);
              generics = { types = [ ty ]; const_generics = [ c ]; _ };
              _;
            };
        args = [ e ];
        dest;
        _;
      } ->
      (* Special treatment *)
      let e = expression_of_operand env e in
      let t = typ_of_ty env ty in
      let t_array = maybe_cg_array env ty c in
      let len = expression_of_const_generic env c in
      let dest = expression_of_place env dest in
      let repeat =
        K.(
          with_type
            (Krml.Helpers.fold_arrow Builtin.array_repeat.cg_args Builtin.array_repeat.typ)
            (EQualified Builtin.array_repeat.name))
      in
      let diff = List.length env.binders - List.length env.cg_binders in
      let repeat =
        K.(
          with_type
            Krml.DeBruijn.(subst_t t 0 (subst_ct diff len 0 Builtin.array_repeat.typ))
            (ETApp (repeat, [ len ], [], [ t ])))
      in
      Krml.Helpers.with_unit
        K.(
          EAssign
            ( dest,
              with_type dest.typ (mk_expr_arr_struct (with_type t_array (EApp (repeat, [ e ])))) ))
  | Call
      {
        func =
          FnOpRegular
            {
              kind = FunId (FBuiltin (Index { is_array = true; mutability = _; is_range = false }));
              generics = { types = [ ty ]; const_generics = [ cg ]; _ };
              _;
            };
        args = [ e1; e2 ];
        dest;
        _;
      } ->
      (* Special treatment for e1[e2] of array which are translated into struct.
         e1[e2] is translated as fn ArrayIndexShared<T,N>(&[T;N], usize) -> &T

         Since [T;N] is translated into arr$T$N, we need to first dereference
         the e1 to get the struct, and then take its field "data" to get the
         array

         We construct dest := &( *e1).data[e2]
         *)
      let e1 = expression_of_operand env e1 in
      let e2 = expression_of_operand env e2 in
      let t = typ_of_ty env ty in
      let t_array = maybe_cg_array env ty cg in
      (* let const = const_of_tbuf e1.K.typ in *)
      let e1 = Krml.Helpers.(mk_deref ~const:true (Krml.Helpers.assert_tbuf e1.K.typ) e1.K.node) in
      let e1 = K.with_type t_array (K.EField (e1, "data")) in
      let dest = expression_of_place env dest in
      Krml.Helpers.with_unit
        K.(EAssign (dest, addrof ~const:false (with_type t (EBufRead (e1, e2)))))
  | Call { func = FnOpRegular fn_ptr; args; dest; _ }
    when Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config RustNames.from_u16 fn_ptr
         || Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config RustNames.from_u32 fn_ptr
         || Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config RustNames.from_u64 fn_ptr
         || Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config RustNames.from_i16 fn_ptr
         || Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config RustNames.from_i32 fn_ptr
         || Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config RustNames.from_i64 fn_ptr
         || Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config RustNames.into_u16 fn_ptr
         || Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config RustNames.into_u32 fn_ptr
         || Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config RustNames.into_u64 fn_ptr
         || Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config RustNames.into_i16 fn_ptr
         || Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config RustNames.into_i32 fn_ptr
         || Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config RustNames.into_i64 fn_ptr
         || false ->
      (* TODO: this can now be properly represented in the AST, this should go
         away! there is *one* case in Kyber that is not caught by
         Cleanup2.remove_trivial_into, and we need to figure out why. *)
      let matches p = Charon.NameMatcher.match_fn_ptr env.name_ctx RustNames.config p fn_ptr in
      let w : Krml.Constant.width =
        if matches RustNames.from_u16 || matches RustNames.into_u16 then
          UInt16
        else if matches RustNames.from_u32 || matches RustNames.into_u32 then
          UInt32
        else if matches RustNames.from_u64 || matches RustNames.into_u64 then
          UInt64
        else if matches RustNames.from_i16 || matches RustNames.into_i16 then
          Int16
        else if matches RustNames.from_i32 || matches RustNames.into_i32 then
          Int32
        else if matches RustNames.from_i64 || matches RustNames.into_i64 then
          Int64
        else
          fail "Unknown from-cast: %s" (string_of_fn_ptr env fn_ptr)
      in
      let dest = expression_of_place env dest in
      let e = expression_of_operand env (Krml.KList.one args) in
      Krml.Helpers.with_unit K.(EAssign (dest, with_type (TInt w) (ECast (e, TInt w))))
  | Call { func = FnOpRegular fn_ptr; args; dest; _ } ->
      (* For now, we take trait type arguments to be part of the code-gen *)
      let hd, _is_known_builtin, output_t = expression_of_fn_ptr env fn_ptr in
      let dest = expression_of_place env dest in
      let args = List.map (expression_of_operand env) args in
      (* This needs to match what is done in the FunGroup case (i.e. when we extract
         a definition). There are two behaviors depending on whether the function is
         builtin or not. *)
      (* Krml.KPrint.bprintf "Call to %s is builtin %b\n" (string_of_fn_ptr env fn_ptr) is_builtin; *)
      let args =
        if args = [] then
          [ Krml.Helpers.eunit ]
        else
          args
      in
      let rhs =
        if args = [] then
          hd
        else
          K.with_type output_t (K.EApp (hd, args))
      in
      (* This does something similar to maybe_addrof *)
      let rhs =
        (* TODO: determine whether extra_types is necessary *)
        let extra_types =
          match fn_ptr.kind with
          | TraitMethod ({ kind = TraitImpl { id = _; generics }; _ }, _, _) -> generics.types
          | _ -> []
        in
        match fn_ptr.kind, fn_ptr.generics.types @ extra_types with
        | ( FunId (FBuiltin (Index { is_array = false; mutability = _; is_range = false })),
            [ TSlice _ ] ) ->
            (* Will decay. See comment above maybe_addrof *)
            rhs
        | ( FunId (FBuiltin (Index { is_array = false; mutability = _; is_range = false })),
            [ TAdt { id; generics } ] )
          when RustNames.is_vec env id generics ->
            (* Will decay. See comment above maybe_addrof *)
            rhs
        | FunId (FBuiltin (Index { is_array = false; mutability = _; is_range = false })), _ ->
            K.(with_type (TBuf (rhs.typ, false)) (EAddrOf rhs))
        | _ -> rhs
      in
      Krml.Helpers.with_unit K.(EAssign (dest, rhs))
  | Call ({ func = FnOpDynamic _; _ } as call) -> expression_of_fn_op_dynamic env call
  | Abort _ -> with_any (K.EAbort (None, Some "panic!"))
  | Return ->
      let e = expression_of_var_id env ret_var in
      K.(with_type TAny (EReturn e))
  | Break n ->
      assert (n = 0);
      K.(with_type TAny EBreak)
  | Continue n ->
      assert (n = 0);
      K.(with_type TAny EContinue)
  | Nop -> Krml.Helpers.eunit
  | Switch (If (op, s1, s2)) ->
      let e1 = expression_of_block env ret_var s1 in
      let e2 = expression_of_block env ret_var s2 in
      let t = lesser e1.typ e2.typ in
      K.(with_type t (EIfThenElse (expression_of_operand env op, e1, e2)))
  | Switch (SwitchInt (scrutinee, int_ty, branches, default)) ->
      let branches =
        List.map
          (fun (litl, block) -> List.map Charon.ValuesUtils.literal_as_scalar litl, block)
          branches
      in
      if int_ty = TInt I128 || int_ty = TUInt U128 then
        expression_of_switch_128bits env ret_var scrutinee branches default
      else
        let scrutinee = expression_of_operand env scrutinee in
        let branches =
          List.concat_map
            (fun (svs, stmt) ->
              List.map
                (fun sv ->
                  K.SConstant (constant_of_scalar_value sv), expression_of_block env ret_var stmt)
                svs)
            branches
          @ [ K.SWild, expression_of_block env ret_var default ]
        in
        let t = Krml.KList.reduce lesser (List.map (fun (_, e) -> e.K.typ) branches) in
        K.(with_type t (ESwitch (scrutinee, branches)))
  | Switch (Match (p, branches, default)) ->
      let scrutinee = expression_of_place env p in
      let typ_id, typ_lid, variant_name_of_variant_id =
        match p.ty with
        | TAdt { id = TAdtId typ_id; _ } ->
            let ty = env.get_nth_type typ_id in
            let variants =
              match ty.kind with
              | Enum variants -> variants
              | _ -> assert false
            in
            ( typ_id,
              lid_of_name env ty.item_meta.name,
              fun v ->
                let v = C.VariantId.nth variants v in
                v.variant_name, List.length v.fields )
        | _ -> failwith "TODO: match on not adt, not option"
      in

      let branches =
        List.concat_map
          (fun (variant_ids, branch) ->
            List.map
              (fun variant_id ->
                let variant_name, n_fields = variant_name_of_variant_id variant_id in
                let dummies = List.init n_fields (fun _ -> K.(with_type TAny PWild)) in
                let pat =
                  if is_enum env typ_id then
                    K.PEnum (mk_enum_case typ_lid variant_name)
                  else
                    K.PCons (variant_name, dummies)
                in
                let pat = K.with_type scrutinee.typ pat in
                [], pat, expression_of_block env ret_var branch)
              variant_ids)
          branches
      in
      let branches =
        branches
        @
        match default with
        | Some default ->
            [ [], K.with_type scrutinee.typ K.PWild, expression_of_block env ret_var default ]
        | None -> []
      in
      let t = Krml.KList.reduce lesser (List.map (fun (_, _, e) -> e.K.typ) branches) in
      K.(with_type t (EMatch (Unchecked, scrutinee, branches)))
  | Loop s -> K.(with_type TUnit (EWhile (Krml.Helpers.etrue, expression_of_block env ret_var s)))
  | _ ->
      failwith
        ("Unsupported statement: "
        ^ Charon.Print.Llbc.statement_kind_to_string env.format_env "" "" s)

and expression_of_statement (env : env) (ret_var : C.local_id) (s : C.statement) : K.expr =
  {
    (expression_of_statement_kind env ret_var s.kind) with
    meta =
      (if !Options.comments then
         List.map (fun x -> K.CommentBefore x) s.comments_before
       else
         []);
  }

and expression_of_block (env : env) (ret_var : C.local_id) (b : C.block) : K.expr =
  let statements = List.map (expression_of_statement env ret_var) b.statements in
  match List.rev statements with
  | [] -> Krml.Helpers.eunit
  | last :: _ -> K.(with_type last.typ (ESequence statements))

(** Top-level declarations: orchestration *)

let of_declaration_group (dg : 'id C.g_declaration_group) (f : 'id -> 'a) : 'a list =
  (* We do not care about recursion as in C, everything is mutually recursive
     thanks to header inclusion. *)
  match dg with
  | NonRecGroup id -> [ f id ]
  | RecGroup ids -> List.map f ids

let seen = ref 0
let total = ref 0

(** List all the ids in this declaration group. *)
let declaration_group_to_list (g : C.declaration_group) : C.item_id list =
  match g with
  | FunGroup g -> List.map (fun id -> C.IdFun id) (C.g_declaration_group_to_list g)
  | TypeGroup g -> List.map (fun id -> C.IdType id) (C.g_declaration_group_to_list g)
  | GlobalGroup g -> List.map (fun id -> C.IdGlobal id) (C.g_declaration_group_to_list g)
  | TraitDeclGroup g -> List.map (fun id -> C.IdTraitDecl id) (C.g_declaration_group_to_list g)
  | TraitImplGroup g -> List.map (fun id
Download .txt
gitextract_fzr909fs/

├── .github/
│   └── workflows/
│       └── nix.yaml
├── .gitignore
├── .ocamlformat
├── .ocamlformat-ignore
├── LICENSE-APACHE
├── LICENSE-MIT
├── Makefile
├── README.md
├── bin/
│   ├── dune
│   └── main.ml
├── cremepat/
│   ├── Lex.ml
│   ├── Parse.mly
│   ├── ParseTree.ml
│   ├── README.md
│   ├── cremepat.ml
│   └── dune
├── dune
├── dune-project
├── eurydice.opam
├── flake.nix
├── include/
│   └── eurydice_glue.h
├── lib/
│   ├── AstOfLlbc.ml
│   ├── Builtin.ml
│   ├── Bundles.ml
│   ├── Cleanup1.ml
│   ├── Cleanup2.ml
│   ├── Cleanup3.ml
│   ├── LoadLlbc.ml
│   ├── Logging.ml
│   ├── Options.ml
│   ├── PreCleanup.ml
│   ├── Utf8.ml
│   └── dune
├── out/
│   ├── test-array/
│   │   ├── array.c
│   │   └── array.h
│   ├── test-array2d/
│   │   ├── array2d.c
│   │   └── array2d.h
│   ├── test-castunsize/
│   │   ├── castunsize.c
│   │   └── castunsize.h
│   ├── test-closure/
│   │   ├── closure.c
│   │   └── closure.h
│   ├── test-closure_fn_cast/
│   │   ├── closure_fn_cast.c
│   │   └── closure_fn_cast.h
│   ├── test-collision/
│   │   ├── collision.c
│   │   └── collision.h
│   ├── test-const_generics/
│   │   ├── const_generics.c
│   │   └── const_generics.h
│   ├── test-core_num/
│   │   ├── core_num.c
│   │   └── core_num.h
│   ├── test-dst/
│   │   ├── dst.c
│   │   └── dst.h
│   ├── test-dyn_trait_struct_type/
│   │   ├── dyn_trait_struct_type.c
│   │   └── dyn_trait_struct_type.h
│   ├── test-floating_points/
│   │   ├── floating_points.c
│   │   └── floating_points.h
│   ├── test-fn_cast/
│   │   ├── fn_cast.c
│   │   └── fn_cast.h
│   ├── test-fn_higher_order/
│   │   ├── fn_higher_order.c
│   │   └── fn_higher_order.h
│   ├── test-for/
│   │   ├── for.c
│   │   └── for.h
│   ├── test-global_ref/
│   │   ├── global_ref.c
│   │   └── global_ref.h
│   ├── test-i32_shl/
│   │   ├── i32_shl.c
│   │   └── i32_shl.h
│   ├── test-inline_attributes/
│   │   ├── inline_attributes.c
│   │   └── inline_attributes.h
│   ├── test-int_switch/
│   │   ├── int_switch.c
│   │   └── int_switch.h
│   ├── test-issue_102/
│   │   ├── issue_102.c
│   │   └── issue_102.h
│   ├── test-issue_104/
│   │   ├── issue_104.c
│   │   └── issue_104.h
│   ├── test-issue_105/
│   │   ├── issue_105.c
│   │   └── issue_105.h
│   ├── test-issue_106/
│   │   ├── issue_106.c
│   │   └── issue_106.h
│   ├── test-issue_107/
│   │   ├── issue_107.c
│   │   └── issue_107.h
│   ├── test-issue_123/
│   │   ├── issue_123.c
│   │   └── issue_123.h
│   ├── test-issue_128/
│   │   ├── issue_128.c
│   │   └── issue_128.h
│   ├── test-issue_212/
│   │   ├── issue_212.c
│   │   └── issue_212.h
│   ├── test-issue_37/
│   │   ├── issue_37.c
│   │   └── issue_37.h
│   ├── test-issue_49/
│   │   ├── issue_49.c
│   │   └── issue_49.h
│   ├── test-issue_96/
│   │   ├── issue_96.c
│   │   └── issue_96.h
│   ├── test-issue_k630/
│   │   ├── issue_k630.c
│   │   └── issue_k630.h
│   ├── test-issue_shift/
│   │   ├── issue_shift.c
│   │   └── issue_shift.h
│   ├── test-libcrux-ml-dsa/
│   │   ├── internal/
│   │   │   ├── libcrux_mldsa_avx2.h
│   │   │   ├── libcrux_mldsa_core.h
│   │   │   ├── libcrux_mldsa_portable.h
│   │   │   ├── libcrux_sha3_avx2.h
│   │   │   └── libcrux_sha3_internal.h
│   │   ├── libcrux_mldsa44_avx2.c
│   │   ├── libcrux_mldsa44_avx2.h
│   │   ├── libcrux_mldsa44_portable.c
│   │   ├── libcrux_mldsa44_portable.h
│   │   ├── libcrux_mldsa65_avx2.c
│   │   ├── libcrux_mldsa65_avx2.h
│   │   ├── libcrux_mldsa65_portable.c
│   │   ├── libcrux_mldsa65_portable.h
│   │   ├── libcrux_mldsa87_avx2.c
│   │   ├── libcrux_mldsa87_avx2.h
│   │   ├── libcrux_mldsa87_portable.c
│   │   ├── libcrux_mldsa87_portable.h
│   │   ├── libcrux_mldsa_avx2.c
│   │   ├── libcrux_mldsa_avx2.h
│   │   ├── libcrux_mldsa_core.c
│   │   ├── libcrux_mldsa_core.h
│   │   ├── libcrux_mldsa_portable.c
│   │   ├── libcrux_mldsa_portable.h
│   │   ├── libcrux_sha3.h
│   │   ├── libcrux_sha3_avx2.c
│   │   ├── libcrux_sha3_avx2.h
│   │   └── libcrux_sha3_internal.h
│   ├── test-libcrux-ml-kem/
│   │   ├── internal/
│   │   │   ├── libcrux_core.h
│   │   │   ├── libcrux_mlkem1024_avx2.h
│   │   │   ├── libcrux_mlkem1024_portable.h
│   │   │   ├── libcrux_mlkem512_avx2.h
│   │   │   ├── libcrux_mlkem512_portable.h
│   │   │   ├── libcrux_mlkem768_avx2.h
│   │   │   ├── libcrux_mlkem768_portable.h
│   │   │   ├── libcrux_mlkem_avx2.h
│   │   │   ├── libcrux_mlkem_portable.h
│   │   │   └── libcrux_sha3_internal.h
│   │   ├── libcrux_core.c
│   │   ├── libcrux_core.h
│   │   ├── libcrux_mlkem1024.h
│   │   ├── libcrux_mlkem1024_avx2.c
│   │   ├── libcrux_mlkem1024_avx2.h
│   │   ├── libcrux_mlkem1024_portable.c
│   │   ├── libcrux_mlkem1024_portable.h
│   │   ├── libcrux_mlkem512.h
│   │   ├── libcrux_mlkem512_avx2.c
│   │   ├── libcrux_mlkem512_avx2.h
│   │   ├── libcrux_mlkem512_portable.c
│   │   ├── libcrux_mlkem512_portable.h
│   │   ├── libcrux_mlkem768.h
│   │   ├── libcrux_mlkem768_avx2.c
│   │   ├── libcrux_mlkem768_avx2.h
│   │   ├── libcrux_mlkem768_portable.c
│   │   ├── libcrux_mlkem768_portable.h
│   │   ├── libcrux_mlkem_avx2.c
│   │   ├── libcrux_mlkem_avx2.h
│   │   ├── libcrux_mlkem_portable.c
│   │   ├── libcrux_mlkem_portable.h
│   │   ├── libcrux_sha3_avx2.c
│   │   ├── libcrux_sha3_avx2.h
│   │   ├── libcrux_sha3_internal.h
│   │   ├── libcrux_sha3_portable.c
│   │   └── libcrux_sha3_portable.h
│   ├── test-libcrux-ml-kem-no-const/
│   │   ├── internal/
│   │   │   ├── libcrux_core.h
│   │   │   ├── libcrux_mlkem1024_avx2.h
│   │   │   ├── libcrux_mlkem1024_portable.h
│   │   │   ├── libcrux_mlkem512_avx2.h
│   │   │   ├── libcrux_mlkem512_portable.h
│   │   │   ├── libcrux_mlkem768_avx2.h
│   │   │   ├── libcrux_mlkem768_portable.h
│   │   │   ├── libcrux_mlkem_avx2.h
│   │   │   ├── libcrux_mlkem_portable.h
│   │   │   └── libcrux_sha3_internal.h
│   │   ├── libcrux_core.c
│   │   ├── libcrux_core.h
│   │   ├── libcrux_mlkem1024.h
│   │   ├── libcrux_mlkem1024_avx2.c
│   │   ├── libcrux_mlkem1024_avx2.h
│   │   ├── libcrux_mlkem1024_portable.c
│   │   ├── libcrux_mlkem1024_portable.h
│   │   ├── libcrux_mlkem512.h
│   │   ├── libcrux_mlkem512_avx2.c
│   │   ├── libcrux_mlkem512_avx2.h
│   │   ├── libcrux_mlkem512_portable.c
│   │   ├── libcrux_mlkem512_portable.h
│   │   ├── libcrux_mlkem768.h
│   │   ├── libcrux_mlkem768_avx2.c
│   │   ├── libcrux_mlkem768_avx2.h
│   │   ├── libcrux_mlkem768_portable.c
│   │   ├── libcrux_mlkem768_portable.h
│   │   ├── libcrux_mlkem_avx2.c
│   │   ├── libcrux_mlkem_avx2.h
│   │   ├── libcrux_mlkem_portable.c
│   │   ├── libcrux_mlkem_portable.h
│   │   ├── libcrux_sha3_avx2.c
│   │   ├── libcrux_sha3_avx2.h
│   │   ├── libcrux_sha3_internal.h
│   │   ├── libcrux_sha3_portable.c
│   │   └── libcrux_sha3_portable.h
│   ├── test-lvalue/
│   │   ├── lvalue.c
│   │   └── lvalue.h
│   ├── test-mismatch/
│   │   ├── mismatch.c
│   │   └── mismatch.h
│   ├── test-more_dst/
│   │   ├── more_dst.c
│   │   └── more_dst.h
│   ├── test-more_primitive_types/
│   │   ├── more_primitive_types.c
│   │   └── more_primitive_types.h
│   ├── test-more_str/
│   │   ├── more_str.c
│   │   └── more_str.h
│   ├── test-names/
│   │   ├── names.c
│   │   └── names.h
│   ├── test-nested_arrays/
│   │   ├── nested_arrays.c
│   │   └── nested_arrays.h
│   ├── test-nested_arrays2/
│   │   ├── nested_arrays2.c
│   │   └── nested_arrays2.h
│   ├── test-option/
│   │   ├── option.c
│   │   └── option.h
│   ├── test-parentparent/
│   │   ├── parentparent.c
│   │   └── parentparent.h
│   ├── test-partial_eq/
│   │   ├── partial_eq.c
│   │   └── partial_eq.h
│   ├── test-raw_pointers/
│   │   ├── raw_pointers.c
│   │   └── raw_pointers.h
│   ├── test-reborrow/
│   │   ├── reborrow.c
│   │   └── reborrow.h
│   ├── test-recursion/
│   │   ├── recursion.c
│   │   └── recursion.h
│   ├── test-repeat/
│   │   ├── repeat.c
│   │   └── repeat.h
│   ├── test-result/
│   │   ├── result.c
│   │   └── result.h
│   ├── test-signed_wrapping/
│   │   ├── signed_wrapping.c
│   │   └── signed_wrapping.h
│   ├── test-slice_array/
│   │   ├── slice_array.c
│   │   └── slice_array.h
│   ├── test-step_by/
│   │   ├── step_by.c
│   │   └── step_by.h
│   ├── test-substr/
│   │   ├── substr.c
│   │   └── substr.h
│   ├── test-symcrust/
│   │   ├── internal/
│   │   │   └── Eurydice.h
│   │   ├── symcrust.c
│   │   └── symcrust.h
│   ├── test-trait_generics/
│   │   ├── trait_generics.c
│   │   └── trait_generics.h
│   ├── test-traits/
│   │   ├── traits.c
│   │   └── traits.h
│   ├── test-traits2/
│   │   ├── traits2.c
│   │   └── traits2.h
│   ├── test-traits3/
│   │   ├── traits3.c
│   │   └── traits3.h
│   ├── test-we_need_charon_monomorphization/
│   │   ├── we_need_charon_monomorphization.c
│   │   └── we_need_charon_monomorphization.h
│   ├── test-where_clauses_closures/
│   │   ├── where_clauses_closures.c
│   │   └── where_clauses_closures.h
│   ├── test-where_clauses_fncg/
│   │   ├── where_clauses_fncg.c
│   │   └── where_clauses_fncg.h
│   ├── test-where_clauses_simple/
│   │   ├── where_clauses_simple.c
│   │   └── where_clauses_simple.h
│   └── testxx-result/
│       ├── result.cc
│       └── result.h
├── scripts/
│   ├── check-dependency.sh
│   ├── ci-check-charon-pin-is-forward.sh
│   ├── ci-check-charon-pin-is-merged.sh
│   ├── format.sh
│   └── update-charon-pin.sh
└── test/
    ├── array.rs
    ├── array2d.rs
    ├── castunsize.rs
    ├── chunks.rs
    ├── closure.rs
    ├── closure_fn_cast.rs
    ├── collision.rs
    ├── const_generics.rs
    ├── core_cmp_lib.c
    ├── core_num.rs
    ├── core_str_lib.c
    ├── dst.rs
    ├── dyn_trait_struct_type.rs
    ├── floating_points.rs
    ├── fn_cast.rs
    ├── fn_higher_order.rs
    ├── for.rs
    ├── global_ref.rs
    ├── i32_shl.rs
    ├── inline_attributes.rs
    ├── int_switch.rs
    ├── issue_102.rs
    ├── issue_104.rs
    ├── issue_105.rs
    ├── issue_106.rs
    ├── issue_107.rs
    ├── issue_123.rs
    ├── issue_128.rs
    ├── issue_14.rs
    ├── issue_212.rs
    ├── issue_311.rs
    ├── issue_37.rs
    ├── issue_49.rs
    ├── issue_96.rs
    ├── issue_99.rs
    ├── issue_k630.rs
    ├── issue_shift.rs
    ├── libcrux-ml-dsa/
    │   ├── CMakeLists.txt
    │   ├── c.yaml
    │   └── tests/
    │       ├── mldsa65.cc
    │       ├── nistkats-65.json
    │       └── nistkats_pre_hashed-65.json
    ├── libcrux-ml-kem/
    │   ├── CMakeLists.txt
    │   ├── c.yaml
    │   ├── intrinsics/
    │   │   └── libcrux_intrinsics_avx2.h
    │   └── tests/
    │       ├── mlkem768.cc
    │       ├── mlkem768_nistkats.json
    │       └── sha3.cc
    ├── lvalue.rs
    ├── main.c
    ├── mismatch.rs
    ├── more_dst.rs
    ├── more_primitive_types.rs
    ├── more_primitive_types.yaml
    ├── more_str.rs
    ├── mutable_slice_range.rs
    ├── names.rs
    ├── nested_arrays.rs
    ├── nested_arrays2.rs
    ├── option.rs
    ├── parentparent.rs
    ├── partial_eq.rs
    ├── partial_eq_stubs.c
    ├── println.rs
    ├── raw_pointers.rs
    ├── reborrow.rs
    ├── recursion.rs
    ├── repeat.rs
    ├── result.rs
    ├── signed_wrapping.rs
    ├── slice_array.rs
    ├── step_by.rs
    ├── substr.rs
    ├── substr.yaml
    ├── substr_impl.c
    ├── substr_stubs.h
    ├── symcrust.rs
    ├── trait_generics.rs
    ├── traits.rs
    ├── traits2.rs
    ├── traits3.rs
    ├── we_need_charon_monomorphization.rs
    ├── where_clauses.rs
    ├── where_clauses_closures.rs
    ├── where_clauses_fncg.rs
    └── where_clauses_simple.rs
Download .txt
Showing preview only (489K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5334 symbols across 271 files)

FILE: include/eurydice_glue.h
  type Eurydice_borrow_slice_u8 (line 73) | typedef struct Eurydice_borrow_slice_u8_s {
  type Eurydice_borrow_slice_i16 (line 79) | typedef struct Eurydice_borrow_slice_i16_s {
  type Eurydice_mut_borrow_slice_u8 (line 85) | typedef struct Eurydice_mut_borrow_slice_u8_s {
  type Eurydice_mut_borrow_slice_i16 (line 91) | typedef struct Eurydice_mut_borrow_slice_i16_s {
  type Eurydice_array_u8x2 (line 191) | typedef struct Eurydice_array_u8x2_s {
  type Eurydice_array_u8x4 (line 196) | typedef struct Eurydice_array_u8x4_s {
  type Eurydice_array_u8x8 (line 201) | typedef struct Eurydice_array_u8x8_s {
  function core_num__u16__from_le_bytes (line 205) | static inline uint16_t core_num__u16__from_le_bytes(Eurydice_array_u8x2 ...
  function Eurydice_array_u8x4 (line 209) | static inline Eurydice_array_u8x4 core_num__u32__to_be_bytes(uint32_t sr...
  function Eurydice_array_u8x4 (line 217) | static inline Eurydice_array_u8x4 core_num__u32__to_le_bytes(uint32_t sr...
  function core_num__u32__from_le_bytes (line 223) | static inline uint32_t core_num__u32__from_le_bytes(Eurydice_array_u8x4 ...
  function Eurydice_array_u8x8 (line 227) | static inline Eurydice_array_u8x8 core_num__u64__to_le_bytes(uint64_t v) {
  function core_num__u64__from_le_bytes (line 233) | static inline uint64_t core_num__u64__from_le_bytes(Eurydice_array_u8x8 ...
  function core_convert_num__core__convert__From_i32__for_i64__from (line 237) | static inline int64_t
  function core_convert_num__core__convert__From_u8__for_u64__from (line 242) | static inline uint64_t
  function core_convert_num__core__convert__From_u16__for_u64__from (line 247) | static inline uint64_t
  function core_convert_num__core__convert__From_u16__for_usize__from (line 252) | static inline size_t
  function core_num__u8__count_ones (line 257) | static inline uint32_t core_num__u8__count_ones(uint8_t x0) {
  function core_num__u32__count_ones (line 265) | static inline uint32_t core_num__u32__count_ones(uint32_t x0) {
  function core_num__i32__count_ones (line 273) | static inline uint32_t core_num__i32__count_ones(int32_t x0) {
  function core_cmp_impls__core__cmp__Ord_for_usize__min (line 281) | static inline size_t core_cmp_impls__core__cmp__Ord_for_usize__min(size_...
  function core_num__u8__wrapping_sub (line 290) | static inline uint8_t core_num__u8__wrapping_sub(uint8_t x, uint8_t y) {
  function core_num__u8__wrapping_add (line 293) | static inline uint8_t core_num__u8__wrapping_add(uint8_t x, uint8_t y) {
  function core_num__u8__wrapping_mul (line 296) | static inline uint8_t core_num__u8__wrapping_mul(uint8_t x, uint8_t y) {
  function core_num__u16__wrapping_sub (line 299) | static inline uint16_t core_num__u16__wrapping_sub(uint16_t x, uint16_t ...
  function core_num__u16__wrapping_add (line 302) | static inline uint16_t core_num__u16__wrapping_add(uint16_t x, uint16_t ...
  function core_num__u16__wrapping_mul (line 305) | static inline uint16_t core_num__u16__wrapping_mul(uint16_t x, uint16_t ...
  function core_num__u32__wrapping_sub (line 308) | static inline uint32_t core_num__u32__wrapping_sub(uint32_t x, uint32_t ...
  function core_num__u32__wrapping_add (line 311) | static inline uint32_t core_num__u32__wrapping_add(uint32_t x, uint32_t ...
  function core_num__u32__wrapping_mul (line 314) | static inline uint32_t core_num__u32__wrapping_mul(uint32_t x, uint32_t ...
  function core_num__u64__wrapping_sub (line 317) | static inline uint64_t core_num__u64__wrapping_sub(uint64_t x, uint64_t ...
  function core_num__u64__wrapping_add (line 320) | static inline uint64_t core_num__u64__wrapping_add(uint64_t x, uint64_t ...
  function core_num__u64__wrapping_mul (line 323) | static inline uint64_t core_num__u64__wrapping_mul(uint64_t x, uint64_t ...
  function core_num__usize__wrapping_sub (line 326) | static inline size_t core_num__usize__wrapping_sub(size_t x, size_t y) {
  function core_num__usize__wrapping_add (line 329) | static inline size_t core_num__usize__wrapping_add(size_t x, size_t y) {
  function core_num__usize__wrapping_mul (line 332) | static inline size_t core_num__usize__wrapping_mul(size_t x, size_t y) {
  function core_num__i8__wrapping_add (line 336) | static inline int8_t core_num__i8__wrapping_add(int8_t x, int8_t y) {
  function core_num__i8__wrapping_sub (line 339) | static inline int8_t core_num__i8__wrapping_sub(int8_t x, int8_t y) {
  function core_num__i8__wrapping_mul (line 342) | static inline int8_t core_num__i8__wrapping_mul(int8_t x, int8_t y) {
  function core_num__i16__wrapping_add (line 345) | static inline int16_t core_num__i16__wrapping_add(int16_t x, int16_t y) {
  function core_num__i16__wrapping_sub (line 348) | static inline int16_t core_num__i16__wrapping_sub(int16_t x, int16_t y) {
  function core_num__i16__wrapping_mul (line 351) | static inline int16_t core_num__i16__wrapping_mul(int16_t x, int16_t y) {
  function core_num__i32__wrapping_add (line 354) | static inline int32_t core_num__i32__wrapping_add(int32_t x, int32_t y) {
  function core_num__i32__wrapping_sub (line 357) | static inline int32_t core_num__i32__wrapping_sub(int32_t x, int32_t y) {
  function core_num__i32__wrapping_mul (line 360) | static inline int32_t core_num__i32__wrapping_mul(int32_t x, int32_t y) {
  function core_num__i64__wrapping_add (line 363) | static inline int64_t core_num__i64__wrapping_add(int64_t x, int64_t y) {
  function core_num__i64__wrapping_sub (line 366) | static inline int64_t core_num__i64__wrapping_sub(int64_t x, int64_t y) {
  function core_num__i64__wrapping_mul (line 369) | static inline int64_t core_num__i64__wrapping_mul(int64_t x, int64_t y) {
  function core_num__i8__wrapping_neg (line 372) | static inline int8_t core_num__i8__wrapping_neg(int8_t x) {
  function core_num__i16__wrapping_neg (line 375) | static inline int16_t core_num__i16__wrapping_neg(int16_t x) {
  function core_num__i32__wrapping_neg (line 378) | static inline int32_t core_num__i32__wrapping_neg(int32_t x) {
  function core_num__i64__wrapping_neg (line 381) | static inline int64_t core_num__i64__wrapping_neg(int64_t x) {
  function core_num__u64__rotate_left (line 385) | static inline uint64_t core_num__u64__rotate_left(uint64_t x0, uint32_t ...
  function core_ops_arith__i32__add_assign (line 389) | static inline void core_ops_arith__i32__add_assign(int32_t *x0, int32_t ...
  function Eurydice_bitand_pv_u8 (line 393) | static inline uint8_t Eurydice_bitand_pv_u8(const uint8_t *p, uint8_t v) {
  function Eurydice_shr_pv_u8 (line 396) | static inline uint8_t Eurydice_shr_pv_u8(const uint8_t *p, int32_t v) {
  function Eurydice_min_u32 (line 399) | static inline uint32_t Eurydice_min_u32(uint32_t x, uint32_t y) {
  function core_ops_bit__core__ops__bit__BitAnd_u8__u8__for__0__u8___bitand (line 403) | static inline uint8_t
  function core_ops_bit__core__ops__bit__Shr_i32__u8__for__0__u8___shr (line 409) | static inline uint8_t
  function core_num_nonzero_private_NonZeroUsizeInner (line 416) | static inline core_num_nonzero_private_NonZeroUsizeInner
  type Eurydice_c_char_t (line 445) | typedef char Eurydice_c_char_t;
  type Eurydice_c_char_t (line 446) | typedef const Eurydice_c_char_t *Prims_string;
  type Eurydice_c_void_t (line 447) | typedef void Eurydice_c_void_t;
  type Eurydice_vec (line 515) | typedef struct {
  function Eurydice_vec (line 532) | static inline Eurydice_vec Eurydice_vec_alloc2(size_t len, size_t elemen...

FILE: out/test-array/array.c
  function Eurydice_borrow_slice_u8 (line 16) | static Eurydice_borrow_slice_u8
  function array_fun (line 23) | uint8_t array_fun(Eurydice_dst_ref_shared_60 x)
  function Eurydice_arr_ec (line 30) | Eurydice_arr_ec array_init(void)
  function array_Foo (line 35) | array_Foo array_mk_foo(void)
  function array_Foo (line 46) | array_Foo array_mk_foo2(void)
  function array_mut_array (line 51) | void array_mut_array(Eurydice_arr_a0 x)
  function array_mut_foo (line 56) | void array_mut_foo(array_Foo f)
  function array_mk_incr_call_mut_e2_55 (line 72) | uint32_t array_mk_incr_call_mut_e2_55(void **_, size_t tupled_args)
  function array_mk_incr_call_once_b7_55 (line 86) | uint32_t array_mk_incr_call_once_b7_55(size_t _)
  function Eurydice_arr_6c (line 98) | Eurydice_arr_6c array_mk_incr_55(void)
  function array_mk_incr2_call_mut_eb_55 (line 119) | uint32_t array_mk_incr2_call_mut_eb_55(const uint32_t **_, size_t tupled...
  function array_mk_incr2_call_once_ad_55 (line 133) | uint32_t array_mk_incr2_call_once_ad_55(const uint32_t *_, size_t _0)
  function Eurydice_arr_6c (line 143) | Eurydice_arr_6c array_mk_incr2_55(void)
  function array_plus_one_call_mut_8d_6c (line 165) | uint16_t array_plus_one_call_mut_8d_6c(void **_, uint32_t tupled_args)
  function array_plus_one_call_once_36_6c (line 179) | uint16_t array_plus_one_call_once_36_6c(uint32_t _)
  function Eurydice_arr_96 (line 191) | Eurydice_arr_96 array_plus_one_6c(Eurydice_arr_d5 x)
  function array_nested_from_fn_closure_call_mut_74_23 (line 210) | size_t array_nested_from_fn_closure_call_mut_74_23(const size_t **_, siz...
  function array_nested_from_fn_closure_call_once_4d_23 (line 224) | size_t array_nested_from_fn_closure_call_once_4d_23(const size_t *_, siz...
  function Eurydice_arr_cc (line 237) | Eurydice_arr_cc array_nested_from_fn_call_mut_6c_23(void **_, size_t tup...
  function Eurydice_arr_cc (line 259) | Eurydice_arr_cc array_nested_from_fn_call_once_d9_23(size_t _)
  function Eurydice_arr_89 (line 271) | Eurydice_arr_89 array_nested_from_fn_23(void)
  function array_const_eq_af (line 289) | bool array_const_eq_af(Eurydice_arr_a0 x, Eurydice_arr_a0 y)
  type const_uint32_t__x2 (line 294) | typedef struct const_uint32_t__x2_s
  type const_uint16_t__x2 (line 301) | typedef struct const_uint16_t__x2_s
  type const_size_t__x2 (line 308) | typedef struct const_size_t__x2_s
  type const_bool__x2 (line 315) | typedef struct const_bool__x2_s
  function array_main (line 322) | void array_main(void)
  function array_references (line 374) | void array_references(void)

FILE: out/test-array/array.h
  type Eurydice_arr_a0 (line 24) | typedef struct Eurydice_arr_a0_s { uint32_t data[2U]; } Eurydice_arr_a0;
  type array_Foo (line 26) | typedef struct array_Foo_s
  type Eurydice_arr_ec (line 42) | typedef struct Eurydice_arr_ec_s { uint8_t data[32U]; } Eurydice_arr_ec;
  type core_ops_range_Range_87 (line 49) | typedef struct core_ops_range_Range_87_s
  type Eurydice_dst_ref_shared_60 (line 61) | typedef struct Eurydice_dst_ref_shared_60_s
  type core_panicking_AssertKind (line 76) | typedef uint8_t core_panicking_AssertKind;
  type Eurydice_arr_6c (line 112) | typedef struct Eurydice_arr_6c_s { uint32_t data[10U]; } Eurydice_arr_6c;
  type Eurydice_arr_96 (line 181) | typedef struct Eurydice_arr_96_s { uint16_t data[1U]; } Eurydice_arr_96;
  type Eurydice_arr_d5 (line 189) | typedef struct Eurydice_arr_d5_s { uint32_t data[1U]; } Eurydice_arr_d5;
  type Eurydice_arr_cc (line 231) | typedef struct Eurydice_arr_cc_s { size_t data[4U]; } Eurydice_arr_cc;
  type Eurydice_arr_89 (line 259) | typedef struct Eurydice_arr_89_s { Eurydice_arr_cc data[4U]; } Eurydice_...

FILE: out/test-array2d/array2d.c
  function array2d_f (line 10) | bool array2d_f(Eurydice_arr_ac x)
  type const_bool__x2 (line 26) | typedef struct const_bool__x2_s
  function array2d_main (line 33) | void array2d_main(void)

FILE: out/test-array2d/array2d.h
  type Eurydice_arr_a0 (line 30) | typedef struct Eurydice_arr_a0_s { uint32_t data[2U]; } Eurydice_arr_a0;
  type Eurydice_arr_ac (line 38) | typedef struct Eurydice_arr_ac_s { Eurydice_arr_a0 data[4U]; } Eurydice_...
  type core_panicking_AssertKind (line 46) | typedef uint8_t core_panicking_AssertKind;

FILE: out/test-castunsize/castunsize.c
  type const_uint32_t__x2 (line 10) | typedef struct const_uint32_t__x2_s
  function castunsize_main1 (line 17) | void castunsize_main1(void)
  function Eurydice_dst_ref_mut_0c (line 34) | static Eurydice_dst_ref_mut_0c array_to_slice_mut_32(Eurydice_arr_e5 *a)
  function castunsize_main3 (line 42) | void castunsize_main3(void)
  function castunsize_main2_a5 (line 60) | void castunsize_main2_a5(void)
  function Eurydice_dst_ref_mut_0c (line 77) | static Eurydice_dst_ref_mut_0c array_to_slice_mut_d0(Eurydice_arr_fb *a)
  function castunsize_main4_a5 (line 90) | void castunsize_main4_a5(void)
  function castunsize_main (line 103) | void castunsize_main(void)

FILE: out/test-castunsize/castunsize.h
  type castunsize_T (line 18) | typedef struct castunsize_T_s
  type core_panicking_AssertKind (line 29) | typedef uint8_t core_panicking_AssertKind;
  type Eurydice_arr_e5 (line 37) | typedef struct Eurydice_arr_e5_s { uint32_t data[4U]; } Eurydice_arr_e5;
  type castunsize_S_e9 (line 44) | typedef struct castunsize_S_e9_s
  type Eurydice_dst_ref_shared_8b (line 56) | typedef struct Eurydice_dst_ref_shared_8b_s
  type Eurydice_dst_ref_shared_0c (line 68) | typedef struct Eurydice_dst_ref_shared_0c_s
  type Eurydice_dst_ref_mut_0c (line 82) | typedef struct Eurydice_dst_ref_mut_0c_s
  type Eurydice_arr_fb (line 97) | typedef struct Eurydice_arr_fb_s { uint32_t data[5U]; } Eurydice_arr_fb;
  type castunsize_S_b9 (line 104) | typedef struct castunsize_S_b9_s

FILE: out/test-closure/closure.c
  function closure_f_closure_call_mut_8a (line 13) | size_t closure_f_closure_call_mut_8a(closure_f_closure_closure *_, size_...
  function closure_f_closure_call_once_b7 (line 22) | size_t closure_f_closure_call_once_b7(closure_f_closure_closure _, size_...
  function Eurydice_arr_58 (line 30) | Eurydice_arr_58 closure_f_call_mut_82(const Eurydice_arr_58 **_, size_t ...
  function Eurydice_arr_58 (line 45) | Eurydice_arr_58 closure_f_call_once_86(const Eurydice_arr_58 *_, size_t _0)
  function Eurydice_arr_2d (line 50) | Eurydice_arr_2d closure_f(void)
  type const_size_t__x2 (line 63) | typedef struct const_size_t__x2_s
  function closure_main (line 70) | void closure_main(void)

FILE: out/test-closure/closure.h
  type Eurydice_arr_58 (line 18) | typedef struct Eurydice_arr_58_s Eurydice_arr_58;
  type Eurydice_arr_58 (line 20) | typedef const Eurydice_arr_58 *closure_f_closure;
  type closure_f_closure_closure (line 22) | typedef struct closure_f_closure_closure_s
  type Eurydice_arr_58 (line 35) | typedef struct Eurydice_arr_58_s { size_t data[1U]; } Eurydice_arr_58;
  type Eurydice_arr_2d (line 63) | typedef struct Eurydice_arr_2d_s { Eurydice_arr_58 data[1U]; } Eurydice_...
  type core_panicking_AssertKind (line 71) | typedef uint8_t core_panicking_AssertKind;

FILE: out/test-closure_fn_cast/closure_fn_cast.c
  function closure_fn_cast_main_call_fd (line 13) | int32_t closure_fn_cast_main_call_fd(void *const *_, int32_t tupled_args)
  function closure_fn_cast_main_call_mut_68 (line 22) | int32_t closure_fn_cast_main_call_mut_68(void **state, int32_t args)
  function closure_fn_cast_main_call_once_fd (line 30) | int32_t closure_fn_cast_main_call_once_fd(int32_t _)
  function closure_fn_cast_main_closure_as_fn (line 37) | int32_t closure_fn_cast_main_closure_as_fn(int32_t arg1)
  function closure_fn_cast_main (line 44) | void closure_fn_cast_main(void)

FILE: out/test-collision/collision.c
  function collision_collision (line 10) | int32_t collision_collision(collision_Either a, collision_Direction b)
  function collision_main (line 37) | void collision_main(void)

FILE: out/test-collision/collision.h
  type collision_Direction_tags (line 22) | typedef uint8_t collision_Direction_tags;
  type collision_Direction (line 24) | typedef struct collision_Direction_s
  type collision_Either_tags (line 38) | typedef uint8_t collision_Either_tags;
  type collision_Either (line 40) | typedef struct collision_Either_s

FILE: out/test-const_generics/const_generics.c
  function Eurydice_mut_borrow_slice_u8 (line 16) | static Eurydice_mut_borrow_slice_u8
  function Eurydice_borrow_slice_u8 (line 31) | static Eurydice_borrow_slice_u8 array_to_slice_shared_98(const Eurydice_...
  function Eurydice_mut_borrow_slice_u8 (line 45) | static Eurydice_mut_borrow_slice_u8
  function Eurydice_array_u8x8 (line 57) | Eurydice_array_u8x8 const_generics_serialize_70(Eurydice_dst_ref_shared_...
  function Eurydice_dst_ref_shared_0c (line 77) | static Eurydice_dst_ref_shared_0c array_to_slice_shared_49(const Eurydic...
  function const_generics_main (line 85) | void const_generics_main(void)
  function const_generics_Pair_30 (line 101) | const_generics_Pair_30 const_generics_mk_pairs_67(uint32_t x, uint64_t y)
  type const_uint32_t__x2 (line 116) | typedef struct const_uint32_t__x2_s
  function const_generics_main1 (line 123) | void const_generics_main1(void)
  function const_generics_f_06 (line 145) | bool const_generics_f_06(uint32_t x, size_t y)
  function const_generics_f_16 (line 177) | bool const_generics_f_16(uint32_t x, size_t y)
  function const_generics_g_16 (line 205) | bool const_generics_g_16(uint32_t x, size_t y)
  type const_bool__x2 (line 226) | typedef struct const_bool__x2_s
  function const_generics_main3 (line 233) | void const_generics_main3(void)

FILE: out/test-const_generics/const_generics.h
  type core_ops_range_RangeTo_87 (line 25) | typedef size_t core_ops_range_RangeTo_87;
  type core_ops_range_RangeFrom_87 (line 32) | typedef size_t core_ops_range_RangeFrom_87;
  type Eurydice_dst_ref_shared_0c (line 39) | typedef struct Eurydice_dst_ref_shared_0c_s
  type Eurydice_arr_a0 (line 59) | typedef struct Eurydice_arr_a0_s { uint32_t data[2U]; } Eurydice_arr_a0;
  type core_panicking_AssertKind (line 67) | typedef uint8_t core_panicking_AssertKind;
  type const_generics_Pair_30 (line 76) | typedef struct const_generics_Pair_30_s
  type Eurydice_arr_e4 (line 89) | typedef struct Eurydice_arr_e4_s { uint64_t data[4U]; } Eurydice_arr_e4;
  type const_generics_Pair_67 (line 98) | typedef struct const_generics_Pair_67_s
  type const_generics_Pair_54 (line 112) | typedef struct const_generics_Pair_54_s
  type Eurydice_arr_d5 (line 136) | typedef struct Eurydice_arr_d5_s { uint32_t data[1U]; } Eurydice_arr_d5;
  type Eurydice_arr_58 (line 144) | typedef struct Eurydice_arr_58_s { size_t data[1U]; } Eurydice_arr_58;
  type Eurydice_arr_a5 (line 160) | typedef struct Eurydice_arr_a5_s { uint32_t data[3U]; } Eurydice_arr_a5;
  type Eurydice_arr_eb (line 168) | typedef struct Eurydice_arr_eb_s { size_t data[3U]; } Eurydice_arr_eb;

FILE: out/test-core_num/core_num.c
  type const_uint32_t__x2 (line 10) | typedef struct const_uint32_t__x2_s
  function core_num_main (line 17) | void core_num_main(void)

FILE: out/test-core_num/core_num.h
  type core_panicking_AssertKind (line 28) | typedef uint8_t core_panicking_AssertKind;

FILE: out/test-dst/dst.c
  function Eurydice_dst_ref_mut_2f (line 10) | Eurydice_dst_ref_mut_2f dst_alloc(void)
  function Eurydice_dst_ref_mut_bb (line 25) | Eurydice_dst_ref_mut_bb dst_alloc3(void)
  type const_uint32_t__x2 (line 50) | typedef struct const_uint32_t__x2_s
  function dst_check_regular_field (line 57) | void dst_check_regular_field(Eurydice_dst_ref_mut_2f x)
  function dst_check_regular_field_ref (line 65) | void dst_check_regular_field_ref(Eurydice_dst_ref_shared_2f x)
  function dst_check_var_field (line 73) | void dst_check_var_field(Eurydice_dst_ref_mut_2f x)
  function dst_check_var_field_ref (line 82) | void dst_check_var_field_ref(Eurydice_dst_ref_shared_2f x)
  function dst_check_var_field_ref3 (line 91) | void dst_check_var_field_ref3(Eurydice_dst_ref_shared_bb x)
  function dst_main3 (line 100) | void dst_main3(void)
  function Eurydice_dst_ref_mut_b7 (line 109) | Eurydice_dst_ref_mut_b7 dst_mk(void)
  function Eurydice_dst_ref_mut_0c (line 128) | static Eurydice_dst_ref_mut_0c array_to_slice_mut_32(Eurydice_arr_e5 *a)
  function dst_main4 (line 136) | void dst_main4(void)
  function dst_main (line 149) | void dst_main(void)

FILE: out/test-dst/dst.h
  type core_panicking_AssertKind (line 22) | typedef uint8_t core_panicking_AssertKind;
  type dst_T (line 24) | typedef struct dst_T_s
  type Eurydice_arr_a5 (line 37) | typedef struct Eurydice_arr_a5_s { uint32_t data[3U]; } Eurydice_arr_a5;
  type dst_T3 (line 39) | typedef struct dst_T3_s
  type Eurydice_dst_ref_mut_2f (line 51) | typedef struct Eurydice_dst_ref_mut_2f_s
  type Eurydice_arr_e5 (line 64) | typedef struct Eurydice_arr_e5_s { uint32_t data[4U]; } Eurydice_arr_e5;
  type dst_S_e9 (line 71) | typedef struct dst_S_e9_s
  type Eurydice_dst_ref_mut_bb (line 85) | typedef struct Eurydice_dst_ref_mut_bb_s
  type Eurydice_arr_53 (line 98) | typedef struct Eurydice_arr_53_s { Eurydice_arr_a5 data[4U]; } Eurydice_...
  type dst_S_93 (line 105) | typedef struct dst_S_93_s
  type Eurydice_dst_ref_shared_2f (line 121) | typedef struct Eurydice_dst_ref_shared_2f_s
  type Eurydice_dst_ref_shared_0c (line 135) | typedef struct Eurydice_dst_ref_shared_0c_s
  type Eurydice_dst_ref_shared_bb (line 151) | typedef struct Eurydice_dst_ref_shared_bb_s
  type Eurydice_dst_ref_shared_d3 (line 163) | typedef struct Eurydice_dst_ref_shared_d3_s
  type dst_T2_be (line 174) | typedef struct dst_T2_be_s dst_T2_be;
  type Eurydice_dst_ref_mut_b7 (line 181) | typedef struct Eurydice_dst_ref_mut_b7_s
  type dst_T2_e9 (line 193) | typedef struct dst_T2_e9_s
  type Eurydice_dst_ref_mut_0c (line 207) | typedef struct Eurydice_dst_ref_mut_0c_s
  type dst_T2_be (line 221) | typedef struct dst_T2_be_s

FILE: out/test-dyn_trait_struct_type/dyn_trait_struct_type.c
  function dyn_trait_struct_type_main (line 10) | void dyn_trait_struct_type_main(void)
  function dyn_trait_struct_type_use_trait (line 15) | void dyn_trait_struct_type_use_trait(Eurydice_dst_ref_shared_06 t)

FILE: out/test-dyn_trait_struct_type/dyn_trait_struct_type.h
  type core_marker_MetaSized__vtable_ (line 18) | typedef struct core_marker_MetaSized__vtable__s core_marker_MetaSized__v...
  type Eurydice_dst_ref_mut_05 (line 25) | typedef struct Eurydice_dst_ref_mut_05_s
  type core_marker_MetaSized__vtable_ (line 32) | typedef struct core_marker_MetaSized__vtable__s
  type dyn_trait_struct_type_Trait__vtable_ (line 42) | typedef struct dyn_trait_struct_type_Trait__vtable__s dyn_trait_struct_t...
  type Eurydice_dst_ref_mut_06 (line 49) | typedef struct Eurydice_dst_ref_mut_06_s
  type Eurydice_dst_ref_shared_06 (line 61) | typedef struct Eurydice_dst_ref_shared_06_s
  type dyn_trait_struct_type_Trait__vtable_ (line 68) | typedef struct dyn_trait_struct_type_Trait__vtable__s

FILE: out/test-floating_points/floating_points.c
  type const_float32_t__x2 (line 10) | typedef struct const_float32_t__x2_s
  type const_float64_t__x2 (line 17) | typedef struct const_float64_t__x2_s
  type const_size_t__x2 (line 24) | typedef struct const_size_t__x2_s
  function floating_points_main (line 31) | void floating_points_main(void)

FILE: out/test-floating_points/floating_points.h
  type core_panicking_AssertKind (line 22) | typedef uint8_t core_panicking_AssertKind;
  type Eurydice_arr_fe (line 30) | typedef struct Eurydice_arr_fe_s { float32_t data[100U]; } Eurydice_arr_fe;
  type Eurydice_arr_9f (line 38) | typedef struct Eurydice_arr_9f_s { float64_t data[100U]; } Eurydice_arr_9f;

FILE: out/test-fn_cast/fn_cast.c
  type const_int32_t__x2 (line 30) | typedef struct const_int32_t__x2_s
  function fn_cast_main (line 37) | void fn_cast_main(void)

FILE: out/test-fn_cast/fn_cast.h
  type core_panicking_AssertKind (line 22) | typedef uint8_t core_panicking_AssertKind;

FILE: out/test-fn_higher_order/fn_higher_order.c
  function fn_higher_order_empty_ptr (line 10) | int32_t fn_higher_order_empty_ptr(int32_t (*f)(void))
  function fn_higher_order_more_sum_lst (line 15) | int32_t fn_higher_order_more_sum_lst(const Eurydice_arr_bf *l)
  function fn_higher_order_compose_cg_apply_4d (line 33) | size_t
  function fn_higher_order_sum_lst_a5 (line 49) | size_t fn_higher_order_sum_lst_a5(const Eurydice_arr_2b *lst)
  function fn_higher_order_id_60 (line 66) | size_t fn_higher_order_id_60(size_t r)
  function fn_higher_order_compose_cg_apply_36 (line 77) | int32_t
  function fn_higher_order_id_a8 (line 93) | int32_t fn_higher_order_id_a8(int32_t r)
  type const_size_t__x2 (line 98) | typedef struct const_size_t__x2_s
  type const_int32_t__x2 (line 105) | typedef struct const_int32_t__x2_s
  function fn_higher_order_use_compose_cg (line 112) | void fn_higher_order_use_compose_cg(void)
  function fn_higher_order_main (line 139) | void fn_higher_order_main(void)
  function fn_higher_order_unit_empty_ptr (line 144) | void fn_higher_order_unit_empty_ptr(void (*f)(void))

FILE: out/test-fn_higher_order/fn_higher_order.h
  type core_cmp_Ordering (line 26) | typedef int8_t core_cmp_Ordering;
  type core_option_Option_77_tags (line 34) | typedef uint8_t core_option_Option_77_tags;
  type core_option_Option_77 (line 41) | typedef struct core_option_Option_77_s
  type core_option_Option_87 (line 59) | typedef struct core_option_Option_87_s
  type tuple_21 (line 77) | typedef struct tuple_21_s
  type core_panicking_AssertKind (line 94) | typedef uint8_t core_panicking_AssertKind;
  type Eurydice_arr_bf (line 104) | typedef struct Eurydice_arr_bf_s { int32_t data[3U]; } Eurydice_arr_bf;
  type Eurydice_arr_2b (line 114) | typedef struct Eurydice_arr_2b_s { size_t data[5U]; } Eurydice_arr_2b;

FILE: out/test-for/for.c
  function for_main (line 10) | void for_main(void)
  function for_other (line 15) | uint8_t for_other(Eurydice_borrow_slice_u8 input)

FILE: out/test-for/for.h
  type core_cmp_Ordering (line 24) | typedef int8_t core_cmp_Ordering;
  type core_option_Option_77_tags (line 32) | typedef uint8_t core_option_Option_77_tags;
  type core_option_Option_77 (line 39) | typedef struct core_option_Option_77_s
  type core_option_Option_9e (line 57) | typedef struct core_option_Option_9e_s
  type core_option_Option_87 (line 75) | typedef struct core_option_Option_87_s
  type tuple_21 (line 87) | typedef struct tuple_21_s

FILE: out/test-global_ref/global_ref.c
  type const_____x2 (line 24) | typedef struct const_____x2_s
  function global_ref_main (line 31) | void global_ref_main(void)

FILE: out/test-global_ref/global_ref.h
  type core_panicking_AssertKind (line 25) | typedef uint8_t core_panicking_AssertKind;

FILE: out/test-i32_shl/i32_shl.c
  type const_int16_t__x2 (line 10) | typedef struct const_int16_t__x2_s
  function i32_shl_main (line 17) | void i32_shl_main(void)

FILE: out/test-i32_shl/i32_shl.h
  type core_panicking_AssertKind (line 22) | typedef uint8_t core_panicking_AssertKind;

FILE: out/test-inline_attributes/inline_attributes.c
  function inline_attributes_f (line 10) | inline uint32_t inline_attributes_f(void)
  function KRML_NOINLINE (line 15) | KRML_NOINLINE uint32_t inline_attributes_g(void)
  function KRML_MUSTINLINE (line 20) | KRML_MUSTINLINE uint32_t inline_attributes_h(void)
  function inline_attributes_main (line 25) | void inline_attributes_main(void)

FILE: out/test-int_switch/int_switch.c
  function int_switch_f (line 10) | uint32_t int_switch_f(void)
  function int_switch_main (line 15) | void int_switch_main(void)

FILE: out/test-issue_102/issue_102.c
  function issue_102_main (line 10) | void issue_102_main(void)

FILE: out/test-issue_102/issue_102.h
  type issue_102_Error1 (line 21) | typedef uint8_t issue_102_Error1;
  type issue_102_Error2 (line 26) | typedef uint8_t issue_102_Error2;

FILE: out/test-issue_104/issue_104.c
  function issue_104_sth_50 (line 16) | uint8_t issue_104_sth_50(void)
  function issue_104_call (line 21) | uint8_t issue_104_call(void)
  type const_uint8_t__x2 (line 26) | typedef struct const_uint8_t__x2_s
  function issue_104_main (line 33) | void issue_104_main(void)

FILE: out/test-issue_104/issue_104.h
  type core_panicking_AssertKind (line 22) | typedef uint8_t core_panicking_AssertKind;

FILE: out/test-issue_105/issue_105.c
  function core_cmp_impls_eq_cf (line 13) | inline bool core_cmp_impls_eq_cf(void *const *self, void *const *_other)
  function core_cmp_impls_ne_cf (line 21) | inline bool core_cmp_impls_ne_cf(void *const *self, void *const *_other)
  function core_cmp_impls_eq_c3 (line 29) | inline bool core_cmp_impls_eq_c3(const uint8_t *self, const uint8_t *other)
  function core_cmp_impls_ne_c3 (line 37) | inline bool core_cmp_impls_ne_c3(const uint8_t *self, const uint8_t *other)
  function core_result_Result_1d (line 42) | core_result_Result_1d issue_105_inner(void)
  function core_ops_control_flow_ControlFlow_19 (line 55) | inline core_ops_control_flow_ControlFlow_19
  function core_result_Result_1d (line 82) | inline core_result_Result_1d core_result_from_residual_1f_48(core_result...
  function core_result_Result_1d (line 94) | core_result_Result_1d issue_105_call_it(void)
  function core_result_eq_0b_74 (line 114) | inline bool
  type const_core_result_Result_1d__x2 (line 148) | typedef struct const_core_result_Result_1d__x2_s
  function issue_105_main (line 155) | void issue_105_main(void)

FILE: out/test-issue_105/issue_105.h
  type core_convert_Infallible (line 40) | typedef uint8_t core_convert_Infallible;
  type core_panicking_AssertKind (line 46) | typedef uint8_t core_panicking_AssertKind;
  type core_result_Result_1d_tags (line 51) | typedef uint8_t core_result_Result_1d_tags;
  type core_result_Result_1d (line 58) | typedef struct core_result_Result_1d_s
  type core_result_Result_8f (line 72) | typedef struct core_result_Result_8f_s
  type core_ops_control_flow_ControlFlow_19_tags (line 86) | typedef uint8_t core_ops_control_flow_ControlFlow_19_tags;
  type core_ops_control_flow_ControlFlow_19 (line 93) | typedef struct core_ops_control_flow_ControlFlow_19_s
  function KRML_MUSTINLINE (line 121) | static KRML_MUSTINLINE uint8_t core_convert_from_61_90(uint8_t t)

FILE: out/test-issue_106/issue_106.c
  function issue_106_generate (line 10) | uint8_t issue_106_generate(void)
  function issue_106_main (line 15) | void issue_106_main(void)
  function issue_106_use_it (line 20) | uint8_t issue_106_use_it(const uint8_t *x)
  function issue_106_use_ref (line 25) | uint8_t issue_106_use_ref(void)

FILE: out/test-issue_106/issue_106.h
  type issue_106_MyStruct (line 18) | typedef uint8_t issue_106_MyStruct;

FILE: out/test-issue_107/issue_107.c
  function issue_107_main (line 10) | void issue_107_main(void)
  function issue_107_f_90 (line 18) | uint8_t issue_107_f_90(void)

FILE: out/test-issue_123/issue_123.c
  function issue_123_fun (line 10) | int32_t issue_123_fun(issue_123_E e)
  type const_ptrdiff_t__x2 (line 15) | typedef struct const_ptrdiff_t__x2_s
  type const_int32_t__x2 (line 22) | typedef struct const_int32_t__x2_s
  function issue_123_main (line 29) | void issue_123_main(void)
  function issue_123_eq_e3 (line 48) | inline bool issue_123_eq_e3(const issue_123_E2 *self, const issue_123_E2...

FILE: out/test-issue_123/issue_123.h
  type core_panicking_AssertKind (line 22) | typedef uint8_t core_panicking_AssertKind;
  type issue_123_E (line 27) | typedef uint8_t issue_123_E;
  type issue_123_E1 (line 33) | typedef int64_t issue_123_E1;
  type issue_123_E2 (line 38) | typedef int16_t issue_123_E2;
  type issue_123_E3 (line 42) | typedef uint8_t issue_123_E3;
  type issue_123_E4 (line 47) | typedef int8_t issue_123_E4;
  type issue_123_Gamma2 (line 52) | typedef uint32_t issue_123_Gamma2;

FILE: out/test-issue_128/issue_128.c
  function issue_128_fun_a (line 10) | void issue_128_fun_a(Eurydice_borrow_slice_u8 _x)
  function issue_128_fun_b (line 15) | void issue_128_fun_b(Eurydice_borrow_slice_u8 _x)
  function issue_128_use_enum (line 20) | void issue_128_use_enum(issue_128_E e, Eurydice_borrow_slice_u8 x)
  function Eurydice_borrow_slice_u8 (line 46) | static Eurydice_borrow_slice_u8 array_to_slice_shared_08(const Eurydice_...
  function issue_128_main (line 54) | void issue_128_main(void)

FILE: out/test-issue_128/issue_128.h
  type issue_128_E (line 21) | typedef uint8_t issue_128_E;
  type Eurydice_arr_bb (line 35) | typedef struct Eurydice_arr_bb_s { uint8_t data[0U]; } Eurydice_arr_bb;

FILE: out/test-issue_212/issue_212.c
  function Eurydice_arr_bf (line 15) | const Eurydice_arr_bf *issue_212_id_mut_25(const Eurydice_arr_bf *x)
  function issue_212_main (line 20) | void issue_212_main(void)

FILE: out/test-issue_212/issue_212.h
  type Eurydice_arr_bf (line 24) | typedef struct Eurydice_arr_bf_s { int32_t data[3U]; } Eurydice_arr_bf;

FILE: out/test-issue_37/issue_37.c
  function Eurydice_arr_ec (line 10) | Eurydice_arr_ec issue_37_b(Eurydice_borrow_slice_u8 x)
  function Eurydice_arr_ec (line 15) | Eurydice_arr_ec issue_37_bb(Eurydice_borrow_slice_u8 x)
  function issue_37_main (line 20) | void issue_37_main(void)

FILE: out/test-issue_37/issue_37.h
  type Eurydice_arr_ec (line 24) | typedef struct Eurydice_arr_ec_s { uint8_t data[32U]; } Eurydice_arr_ec;

FILE: out/test-issue_49/issue_49.c
  function issue_49_f (line 10) | size_t issue_49_f(size_t a, size_t b)
  type const_size_t__x2 (line 15) | typedef struct const_size_t__x2_s
  function issue_49_main (line 22) | void issue_49_main(void)

FILE: out/test-issue_49/issue_49.h
  type core_panicking_AssertKind (line 24) | typedef uint8_t core_panicking_AssertKind;

FILE: out/test-issue_96/issue_96.c
  function issue_96_use_it (line 10) | void issue_96_use_it(const Eurydice_arr_48 *x)
  function issue_96_use_it2 (line 15) | void issue_96_use_it2(const issue_96_MyStruct2 *x)
  function issue_96_main (line 20) | void issue_96_main(void)

FILE: out/test-issue_96/issue_96.h
  type Eurydice_arr_48 (line 24) | typedef struct Eurydice_arr_48_s { uint8_t data[5U]; } Eurydice_arr_48;
  type Eurydice_arr_48 (line 26) | typedef Eurydice_arr_48 issue_96_MyStruct;
  type issue_96_MyStruct2 (line 28) | typedef struct issue_96_MyStruct2_s

FILE: out/test-issue_k630/issue_k630.c
  type const_uint32_t__x2 (line 10) | typedef struct const_uint32_t__x2_s
  function issue_k630_main (line 17) | void issue_k630_main(void)

FILE: out/test-issue_k630/issue_k630.h
  type core_panicking_AssertKind (line 22) | typedef uint8_t core_panicking_AssertKind;
  type Eurydice_arr_d5 (line 30) | typedef struct Eurydice_arr_d5_s { uint32_t data[1U]; } Eurydice_arr_d5;
  type Eurydice_arr_21 (line 38) | typedef struct Eurydice_arr_21_s { Eurydice_arr_d5 data[5U]; } Eurydice_...

FILE: out/test-issue_shift/issue_shift.c
  type const_int32_t__x2 (line 10) | typedef struct const_int32_t__x2_s
  type const_int8_t__x2 (line 17) | typedef struct const_int8_t__x2_s
  type const_int16_t__x2 (line 24) | typedef struct const_int16_t__x2_s
  type const_int64_t__x2 (line 31) | typedef struct const_int64_t__x2_s
  function issue_shift_main (line 38) | void issue_shift_main(void)

FILE: out/test-issue_shift/issue_shift.h
  type core_panicking_AssertKind (line 22) | typedef uint8_t core_panicking_AssertKind;

FILE: out/test-libcrux-ml-dsa/internal/libcrux_mldsa_avx2.h
  type Eurydice_arr_53 (line 26) | typedef struct Eurydice_arr_53_s { Eurydice_arr_cd0 data[8U]; } Eurydice...
  type Eurydice_dst_ref_shared_2a (line 33) | typedef struct Eurydice_dst_ref_shared_2a_s
  type Eurydice_arr_15 (line 46) | typedef struct Eurydice_arr_15_s { Eurydice_arr_cd0 data[4U]; } Eurydice...
  type Eurydice_arr_b50 (line 54) | typedef struct Eurydice_arr_b50_s { Eurydice_arr_cd0 data[6U]; } Eurydic...
  type Eurydice_arr_dd (line 62) | typedef struct Eurydice_arr_dd_s { Eurydice_arr_cd0 data[5U]; } Eurydice...
  type Eurydice_arr_39 (line 70) | typedef struct Eurydice_arr_39_s { Eurydice_arr_cd0 data[7U]; } Eurydice...

FILE: out/test-libcrux-ml-dsa/internal/libcrux_mldsa_core.h
  type Eurydice_arr_c3 (line 140) | typedef struct Eurydice_arr_c3_s Eurydice_arr_c3;
  type Eurydice_dst_ref_mut_22 (line 147) | typedef struct Eurydice_dst_ref_mut_22_s
  type Eurydice_arr_c3 (line 160) | typedef struct Eurydice_arr_c3_s { int32_t data[256U]; } Eurydice_arr_c3;
  type Eurydice_arr_a2 (line 181) | typedef struct Eurydice_arr_a2_s { uint8_t data[66U]; } Eurydice_arr_a2;
  type uint8_t_x2 (line 195) | typedef struct uint8_t_x2_s
  type Eurydice_arr_48 (line 211) | typedef struct Eurydice_arr_48_s { uint8_t data[34U]; } Eurydice_arr_48;
  type Eurydice_arr_cb (line 222) | typedef struct Eurydice_arr_cb_s { uint8_t data[11U]; } Eurydice_arr_cb;
  type core_option_Option_b5 (line 229) | typedef struct core_option_Option_b5_s
  type libcrux_ml_dsa_pre_hash_DomainSeparationContext (line 236) | typedef struct libcrux_ml_dsa_pre_hash_DomainSeparationContext_s
  type libcrux_ml_dsa_pre_hash_DomainSeparationError (line 245) | typedef uint8_t libcrux_ml_dsa_pre_hash_DomainSeparationError;
  type core_result_Result_a8 (line 252) | typedef struct core_result_Result_a8_s
  type Eurydice_arr_38 (line 351) | typedef Eurydice_arr_38 libcrux_ml_dsa_ml_dsa_generic_ml_dsa_87_MLDSA87S...
  type Eurydice_arr_400 (line 418) | typedef Eurydice_arr_400 libcrux_ml_dsa_ml_dsa_generic_ml_dsa_44_MLDSA44...
  type Eurydice_arr_96 (line 485) | typedef Eurydice_arr_96 libcrux_ml_dsa_ml_dsa_generic_ml_dsa_65_MLDSA65S...
  type Eurydice_arr_6d (line 558) | typedef struct Eurydice_arr_6d_s { uint8_t data[24U]; } Eurydice_arr_6d;
  type Eurydice_arr_91 (line 610) | typedef struct Eurydice_arr_91_s { uint8_t data[19U]; } Eurydice_arr_91;
  type Eurydice_arr_fb (line 685) | typedef struct Eurydice_arr_fb_s { Eurydice_arr_c3 data[8U]; } Eurydice_...
  type core_option_Option_b9 (line 692) | typedef struct core_option_Option_b9_s
  type Eurydice_arr_25 (line 705) | typedef struct Eurydice_arr_25_s { Eurydice_arr_a4 data[7U]; } Eurydice_...
  type core_option_Option_0d (line 712) | typedef struct core_option_Option_0d_s
  type core_option_Option_d9 (line 724) | typedef struct core_option_Option_d9_s
  type Eurydice_dst_ref_shared_22 (line 744) | typedef struct Eurydice_dst_ref_shared_22_s
  type Eurydice_arr_9e (line 773) | typedef struct Eurydice_arr_9e_s { uint8_t data[1024U]; } Eurydice_arr_9e;
  type Eurydice_dst_ref_shared_e7 (line 796) | typedef struct Eurydice_dst_ref_shared_e7_s
  type Eurydice_arr_46 (line 809) | typedef struct Eurydice_arr_46_s { Eurydice_arr_a4 data[56U]; } Eurydice...
  type Eurydice_arr_f8 (line 854) | typedef struct Eurydice_arr_f8_s { Eurydice_arr_a4 data[15U]; } Eurydice...
  type Eurydice_arr_b5 (line 935) | typedef struct Eurydice_arr_b5_s { Eurydice_arr_c3 data[6U]; } Eurydice_...
  type core_option_Option_cb (line 942) | typedef struct core_option_Option_cb_s
  type Eurydice_arr_b0 (line 955) | typedef struct Eurydice_arr_b0_s { Eurydice_arr_a4 data[5U]; } Eurydice_...
  type core_option_Option_c8 (line 962) | typedef struct core_option_Option_c8_s
  type core_option_Option_a6 (line 974) | typedef struct core_option_Option_a6_s
  type Eurydice_arr_a1 (line 1019) | typedef struct Eurydice_arr_a1_s { Eurydice_arr_a4 data[30U]; } Eurydice...
  type Eurydice_arr_a3 (line 1064) | typedef struct Eurydice_arr_a3_s { Eurydice_arr_a4 data[6U]; } Eurydice_...
  type Eurydice_arr_58 (line 1088) | typedef struct Eurydice_arr_58_s { Eurydice_arr_a4 data[11U]; } Eurydice...
  type Eurydice_borrow_slice_u8_x2 (line 1221) | typedef struct Eurydice_borrow_slice_u8_x2_s
  type Eurydice_arr_83 (line 1298) | typedef struct Eurydice_arr_83_s { Eurydice_arr_c3 data[4U]; } Eurydice_...
  type core_option_Option_cf (line 1305) | typedef struct core_option_Option_cf_s
  type Eurydice_arr_a80 (line 1318) | typedef struct Eurydice_arr_a80_s { Eurydice_arr_a4 data[4U]; } Eurydice...
  type core_option_Option_43 (line 1325) | typedef struct core_option_Option_43_s
  type core_option_Option_90 (line 1337) | typedef struct core_option_Option_90_s
  type Eurydice_arr_56 (line 1485) | typedef struct Eurydice_arr_56_s { uint8_t data[768U]; } Eurydice_arr_56;
  type Eurydice_arr_66 (line 1537) | typedef struct Eurydice_arr_66_s { Eurydice_arr_a4 data[16U]; } Eurydice...
  type core_option_Option_84 (line 1602) | typedef struct core_option_Option_84_s
  type Eurydice_arr_f10 (line 1646) | typedef struct Eurydice_arr_f10_s { uint8_t data[1U]; } Eurydice_arr_f10;
  type Eurydice_arr_db (line 1775) | typedef struct Eurydice_arr_db_s { Eurydice_arr_a4 data[8U]; } Eurydice_...
  type Eurydice_arr_13 (line 1843) | typedef struct Eurydice_arr_13_s { int32_t data[263U]; } Eurydice_arr_13;
  type Eurydice_dst_ref_mut_4c (line 1850) | typedef struct Eurydice_dst_ref_mut_4c_s
  type Eurydice_arr_380 (line 1863) | typedef struct Eurydice_arr_380_s { Eurydice_arr_13 data[4U]; } Eurydice...
  type Eurydice_dst_ref_shared_4c (line 1878) | typedef struct Eurydice_dst_ref_shared_4c_s
  type Eurydice_arr_d10 (line 1966) | typedef struct Eurydice_arr_d10_s { uint8_t data[128U]; } Eurydice_arr_d10;
  type Eurydice_arr_1a (line 2039) | typedef struct Eurydice_arr_1a_s { Eurydice_arr_3d data[4U]; } Eurydice_...
  type Eurydice_arr_b3 (line 2047) | typedef struct Eurydice_arr_b3_s { Eurydice_arr_27 data[4U]; } Eurydice_...
  type Eurydice_arr_cd (line 2055) | typedef struct Eurydice_arr_cd_s { Eurydice_borrow_slice_u8 data[4U]; } ...
  type Eurydice_arr_3a (line 2072) | typedef struct Eurydice_arr_3a_s { Eurydice_arr_27 data[1U]; } Eurydice_...
  type Eurydice_arr_a0 (line 2088) | typedef struct Eurydice_arr_a0_s { uint8_t data[72U]; } Eurydice_arr_a0;

FILE: out/test-libcrux-ml-dsa/internal/libcrux_sha3_avx2.h
  type Eurydice_arr_c0 (line 55) | typedef struct Eurydice_arr_c0_s { __m256i data[5U]; } Eurydice_arr_c0;

FILE: out/test-libcrux-ml-dsa/internal/libcrux_sha3_internal.h
  function libcrux_sha3_portable_incremental_shake128_init (line 25) | libcrux_sha3_portable_incremental_shake128_init(void)
  function KRML_MUSTINLINE (line 33) | static KRML_MUSTINLINE void
  function libcrux_sha3_portable_incremental_shake256_init (line 47) | libcrux_sha3_portable_incremental_shake256_init(void)
  function KRML_MUSTINLINE (line 55) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 74) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 86) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 103) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 123) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 140) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 154) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 171) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 185) | static KRML_MUSTINLINE void
  function libcrux_sha3_generic_keccak_xof_fill_buffer_35_c6 (line 204) | static inline size_t
  type Eurydice_arr_3e (line 245) | typedef const Eurydice_arr_3e *libcrux_sha3_generic_keccak_xof_buf_to_sl...
  function Eurydice_borrow_slice_u8 (line 256) | static inline Eurydice_borrow_slice_u8
  function Eurydice_borrow_slice_u8 (line 279) | static inline Eurydice_borrow_slice_u8
  function KRML_MUSTINLINE (line 294) | static KRML_MUSTINLINE Eurydice_arr_06
  function libcrux_sha3_generic_keccak_xof_absorb_full_35_c6 (line 316) | static inline size_t
  function KRML_MUSTINLINE (line 353) | static KRML_MUSTINLINE void
  function libcrux_sha3_portable_incremental_absorb_42 (line 391) | static inline void
  function KRML_MUSTINLINE (line 413) | static KRML_MUSTINLINE void
  function libcrux_sha3_portable_incremental_absorb_final_42 (line 431) | static inline void
  function Eurydice_arr_3d (line 452) | static inline Eurydice_arr_3d libcrux_sha3_generic_keccak_xof_zero_block...
  function libcrux_sha3_generic_keccak_xof_KeccakXofState_e2 (line 467) | static inline libcrux_sha3_generic_keccak_xof_KeccakXofState_e2
  function libcrux_sha3_generic_keccak_xof_KeccakXofState_e2 (line 488) | static inline libcrux_sha3_generic_keccak_xof_KeccakXofState_e2
  function KRML_MUSTINLINE (line 503) | static KRML_MUSTINLINE void
  function libcrux_sha3_portable_incremental_squeeze_42 (line 553) | static inline void
  type libcrux_sha3_Algorithm (line 567) | typedef uint8_t libcrux_sha3_Algorithm;
  function libcrux_sha3_digest_size (line 580) | static inline size_t libcrux_sha3_digest_size(libcrux_sha3_Algorithm mode)
  function KRML_MUSTINLINE (line 614) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 677) | static KRML_MUSTINLINE void
  function libcrux_sha3_simd_portable_load_last_a1_96 (line 708) | static inline void
  function KRML_MUSTINLINE (line 730) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 747) | static KRML_MUSTINLINE void
  function libcrux_sha3_simd_portable_squeeze_9b_f8 (line 797) | static inline void
  function libcrux_sha3_simd_portable_load_block_a1_f8 (line 816) | static inline void
  function KRML_MUSTINLINE (line 836) | static KRML_MUSTINLINE void
  function libcrux_sha3_generic_keccak_portable_keccak1_96 (line 853) | static inline void
  function KRML_MUSTINLINE (line 922) | static KRML_MUSTINLINE void
  function libcrux_sha3_sha512_ema (line 934) | static inline void
  function Eurydice_arr_060 (line 943) | static inline Eurydice_arr_060 libcrux_sha3_sha512(Eurydice_borrow_slice...
  type libcrux_sha3_generic_keccak_xof_KeccakXofState_97 (line 957) | typedef struct libcrux_sha3_generic_keccak_xof_KeccakXofState_97_s
  type libcrux_sha3_generic_keccak_xof_KeccakXofState_97 (line 966) | typedef libcrux_sha3_generic_keccak_xof_KeccakXofState_97
  function KRML_MUSTINLINE (line 977) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 993) | static KRML_MUSTINLINE void

FILE: out/test-libcrux-ml-dsa/libcrux_mldsa44_avx2.c
  function libcrux_ml_dsa_ml_dsa_generic_ml_dsa_44_MLDSA44KeyPair (line 18) | libcrux_ml_dsa_ml_dsa_generic_ml_dsa_44_MLDSA44KeyPair
  function core_result_Result_48 (line 43) | core_result_Result_48
  function core_result_Result_53 (line 66) | core_result_Result_53
  function core_result_Result_48 (line 91) | core_result_Result_48
  function core_result_Result_41 (line 117) | core_result_Result_41
  function core_result_Result_41 (line 140) | core_result_Result_41

FILE: out/test-libcrux-ml-dsa/libcrux_mldsa44_portable.c
  function libcrux_ml_dsa_ml_dsa_generic_ml_dsa_44_MLDSA44KeyPair (line 17) | libcrux_ml_dsa_ml_dsa_generic_ml_dsa_44_MLDSA44KeyPair
  function core_result_Result_48 (line 41) | core_result_Result_48
  function core_result_Result_53 (line 63) | core_result_Result_53
  function core_result_Result_48 (line 87) | core_result_Result_48
  function core_result_Result_41 (line 112) | core_result_Result_41
  function core_result_Result_41 (line 134) | core_result_Result_41

FILE: out/test-libcrux-ml-dsa/libcrux_mldsa65_avx2.c
  function libcrux_ml_dsa_ml_dsa_generic_ml_dsa_65_MLDSA65KeyPair (line 18) | libcrux_ml_dsa_ml_dsa_generic_ml_dsa_65_MLDSA65KeyPair
  function libcrux_ml_dsa_ml_dsa_65_avx2_generate_key_pair_mut (line 39) | void
  function core_result_Result_8c (line 59) | core_result_Result_8c
  function core_result_Result_53 (line 82) | core_result_Result_53
  function core_result_Result_8c (line 107) | core_result_Result_8c
  function core_result_Result_41 (line 133) | core_result_Result_41
  function core_result_Result_41 (line 156) | core_result_Result_41

FILE: out/test-libcrux-ml-dsa/libcrux_mldsa65_portable.c
  function libcrux_ml_dsa_ml_dsa_generic_ml_dsa_65_MLDSA65KeyPair (line 17) | libcrux_ml_dsa_ml_dsa_generic_ml_dsa_65_MLDSA65KeyPair
  function libcrux_ml_dsa_ml_dsa_65_portable_generate_key_pair_mut (line 37) | void
  function core_result_Result_8c (line 56) | core_result_Result_8c
  function core_result_Result_53 (line 78) | core_result_Result_53
  function core_result_Result_8c (line 102) | core_result_Result_8c
  function core_result_Result_41 (line 127) | core_result_Result_41
  function core_result_Result_41 (line 149) | core_result_Result_41

FILE: out/test-libcrux-ml-dsa/libcrux_mldsa87_avx2.c
  function libcrux_ml_dsa_ml_dsa_generic_ml_dsa_87_MLDSA87KeyPair (line 18) | libcrux_ml_dsa_ml_dsa_generic_ml_dsa_87_MLDSA87KeyPair
  function core_result_Result_8b (line 43) | core_result_Result_8b
  function core_result_Result_53 (line 66) | core_result_Result_53
  function core_result_Result_8b (line 91) | core_result_Result_8b
  function core_result_Result_41 (line 117) | core_result_Result_41
  function core_result_Result_41 (line 140) | core_result_Result_41

FILE: out/test-libcrux-ml-dsa/libcrux_mldsa87_portable.c
  function libcrux_ml_dsa_ml_dsa_generic_ml_dsa_87_MLDSA87KeyPair (line 17) | libcrux_ml_dsa_ml_dsa_generic_ml_dsa_87_MLDSA87KeyPair
  function core_result_Result_8b (line 41) | core_result_Result_8b
  function core_result_Result_53 (line 63) | core_result_Result_53
  function core_result_Result_8b (line 87) | core_result_Result_8b
  function core_result_Result_41 (line 112) | core_result_Result_41
  function core_result_Result_41 (line 134) | core_result_Result_41

FILE: out/test-libcrux-ml-dsa/libcrux_mldsa_avx2.c
  function Eurydice_arr_05 (line 23) | Eurydice_arr_05
  function Eurydice_arr_26 (line 37) | Eurydice_arr_26
  function Eurydice_arr_05 (line 48) | Eurydice_arr_05
  function Eurydice_arr_3d (line 62) | Eurydice_arr_3d
  function Eurydice_arr_3d_x4 (line 72) | Eurydice_arr_3d_x4
  function libcrux_ml_dsa_hash_functions_simd256_squeeze_first_five_blocks (line 89) | void
  function Eurydice_arr_27_x4 (line 106) | Eurydice_arr_27_x4
  function Eurydice_arr_3d (line 123) | Eurydice_arr_3d
  function Eurydice_arr_3d_x4 (line 133) | Eurydice_arr_3d_x4
  function Eurydice_arr_05 (line 156) | Eurydice_arr_05
  function libcrux_ml_dsa_hash_functions_simd256_squeeze_first_five_blocks_3b (line 171) | void
  function Eurydice_arr_27_x4 (line 187) | Eurydice_arr_27_x4
  function Eurydice_arr_26 (line 197) | Eurydice_arr_26
  function Eurydice_arr_3d (line 207) | Eurydice_arr_3d
  function Eurydice_arr_3d (line 217) | Eurydice_arr_3d
  function Eurydice_arr_05 (line 227) | Eurydice_arr_05
  function Eurydice_arr_3d_x4 (line 242) | Eurydice_arr_3d_x4
  function Eurydice_arr_3d_x4 (line 252) | Eurydice_arr_3d_x4
  function __m256i (line 261) | __m256i libcrux_ml_dsa_simd_avx2_vector_type_zero(void)
  function __m256i (line 269) | __m256i libcrux_ml_dsa_simd_avx2_zero_a2(void)
  function libcrux_ml_dsa_simd_avx2_vector_type_from_coefficient_array (line 278) | void
  function libcrux_ml_dsa_simd_avx2_from_coefficient_array_a2 (line 291) | void
  function libcrux_ml_dsa_simd_avx2_vector_type_to_coefficient_array (line 304) | void
  function libcrux_ml_dsa_simd_avx2_to_coefficient_array_a2 (line 317) | void
  function libcrux_ml_dsa_simd_avx2_arithmetic_add (line 327) | inline void
  function libcrux_ml_dsa_simd_avx2_add_a2 (line 337) | void
  function libcrux_ml_dsa_simd_avx2_arithmetic_subtract (line 344) | inline void
  function libcrux_ml_dsa_simd_avx2_subtract_a2 (line 354) | void
  function libcrux_ml_dsa_simd_avx2_arithmetic_infinity_norm_exceeds (line 361) | inline bool
  function libcrux_ml_dsa_simd_avx2_infinity_norm_exceeds_a2 (line 378) | bool
  function __m256i (line 385) | inline __m256i
  function libcrux_ml_dsa_simd_avx2_arithmetic_decompose (line 397) | void
  function libcrux_ml_dsa_simd_avx2_decompose_a2 (line 454) | void
  function libcrux_ml_dsa_simd_avx2_arithmetic_compute_hint (line 466) | size_t
  function libcrux_ml_dsa_simd_avx2_compute_hint_a2 (line 492) | size_t
  type core_core_arch_x86___m256i_x2 (line 503) | typedef struct core_core_arch_x86___m256i_x2_s
  function libcrux_ml_dsa_simd_avx2_arithmetic_use_hint (line 511) | void
  function libcrux_ml_dsa_simd_avx2_use_hint_a2 (line 551) | void
  function libcrux_ml_dsa_simd_avx2_arithmetic_montgomery_multiply_aux (line 558) | void
  function libcrux_ml_dsa_simd_avx2_arithmetic_montgomery_multiply (line 582) | void
  function libcrux_ml_dsa_simd_avx2_montgomery_multiply_a2 (line 599) | void
  function libcrux_ml_dsa_simd_avx2_arithmetic_to_unsigned_representatives (line 606) | inline void
  function libcrux_ml_dsa_simd_avx2_arithmetic_power2round (line 613) | inline void
  function libcrux_ml_dsa_simd_avx2_power2round_a2 (line 631) | void
  function __m256i (line 638) | __m256i
  function libcrux_ml_dsa_simd_avx2_rejection_sample_less_than_field_modulus_sample (line 701) | size_t
  function libcrux_ml_dsa_simd_avx2_rejection_sample_less_than_field_modulus_a2 (line 748) | size_t
  function __m256i (line 760) | __m256i
  function __m256i (line 792) | __m256i
  function __m256i (line 824) | __m256i
  function __m256i (line 857) | __m256i
  function libcrux_ml_dsa_simd_avx2_rejection_sample_less_than_eta_sample_fd (line 875) | size_t
  function libcrux_ml_dsa_simd_avx2_rejection_sample_less_than_eta_equals_2_a2 (line 929) | size_t
  function __m256i (line 944) | __m256i
  function libcrux_ml_dsa_simd_avx2_rejection_sample_less_than_eta_sample_ac (line 956) | size_t
  function libcrux_ml_dsa_simd_avx2_rejection_sample_less_than_eta_equals_4_a2 (line 1010) | size_t
  function __m256i (line 1020) | __m256i
  function libcrux_ml_dsa_simd_avx2_encoding_gamma1_serialize_when_gamma1_is_2_pow_19 (line 1074) | void
  function __m256i (line 1103) | __m256i
  function libcrux_ml_dsa_simd_avx2_encoding_gamma1_serialize_when_gamma1_is_2_pow_17 (line 1131) | void
  function libcrux_ml_dsa_simd_avx2_encoding_gamma1_serialize (line 1160) | void
  function libcrux_ml_dsa_simd_avx2_gamma1_serialize_a2 (line 1193) | void
  function libcrux_ml_dsa_simd_avx2_encoding_gamma1_deserialize_when_gamma1_is_2_pow_17_unsigned (line 1204) | void
  function libcrux_ml_dsa_simd_avx2_encoding_gamma1_deserialize_when_gamma1_is_2_pow_19_unsigned (line 1273) | void
  function libcrux_ml_dsa_simd_avx2_encoding_gamma1_deserialize (line 1342) | void
  function libcrux_ml_dsa_simd_avx2_gamma1_deserialize_a2 (line 1395) | void
  function __m128i (line 1406) | __m128i
  function __m256i (line 1454) | __m256i
  function libcrux_ml_dsa_simd_avx2_encoding_commitment_serialize (line 1536) | void
  function libcrux_ml_dsa_simd_avx2_commitment_serialize_a2 (line 1586) | void
  function __m128i (line 1596) | __m128i
  function libcrux_ml_dsa_simd_avx2_encoding_error_serialize_when_eta_is_4 (line 1644) | void
  function __m128i (line 1668) | __m128i
  function libcrux_ml_dsa_simd_avx2_encoding_error_serialize_when_eta_is_2 (line 1757) | void
  function libcrux_ml_dsa_simd_avx2_encoding_error_serialize (line 1781) | void
  function libcrux_ml_dsa_simd_avx2_error_serialize_a2 (line 1812) | void
  function libcrux_ml_dsa_simd_avx2_encoding_error_deserialize (line 1823) | void
  function libcrux_ml_dsa_simd_avx2_error_deserialize_a2 (line 1858) | void
  function __m256i (line 1869) | __m256i
  function __m128i (line 1879) | __m128i
  function libcrux_ml_dsa_simd_avx2_encoding_t0_serialize (line 1928) | void
  function libcrux_ml_dsa_simd_avx2_t0_serialize_a2 (line 1949) | void
  function libcrux_ml_dsa_simd_avx2_encoding_t0_deserialize_unsigned (line 1959) | void
  function libcrux_ml_dsa_simd_avx2_encoding_t0_deserialize (line 2026) | void
  function libcrux_ml_dsa_simd_avx2_t0_deserialize_a2 (line 2040) | void
  function libcrux_ml_dsa_simd_avx2_encoding_t1_serialize (line 2047) | void
  function libcrux_ml_dsa_simd_avx2_t1_serialize_a2 (line 2107) | void
  function libcrux_ml_dsa_simd_avx2_encoding_t1_deserialize (line 2117) | void
  function libcrux_ml_dsa_simd_avx2_t1_deserialize_a2 (line 2182) | void
  function libcrux_ml_dsa_simd_avx2_ntt_ntt_at_layer_7_and_6_mul (line 2189) | void
  function libcrux_ml_dsa_simd_avx2_ntt_ntt_at_layer_7_and_6 (line 2216) | void
  function libcrux_ml_dsa_simd_avx2_ntt_ntt_at_layer_5_to_3_round_f6 (line 2427) | void
  function libcrux_ml_dsa_simd_avx2_ntt_ntt_at_layer_5_to_3_round_90 (line 2455) | void
  function libcrux_ml_dsa_simd_avx2_ntt_ntt_at_layer_5_to_3_round_7b (line 2483) | void
  function libcrux_ml_dsa_simd_avx2_ntt_ntt_at_layer_5_to_3 (line 2510) | void
  function libcrux_ml_dsa_simd_avx2_ntt_butterfly_8 (line 2544) | void
  function libcrux_ml_dsa_simd_avx2_ntt_ntt_at_layer_2 (line 2568) | void
  function libcrux_ml_dsa_simd_avx2_ntt_butterfly_4 (line 2593) | void
  function libcrux_ml_dsa_simd_avx2_ntt_ntt_at_layer_1 (line 2619) | void
  function libcrux_ml_dsa_simd_avx2_ntt_butterfly_2 (line 2721) | void
  function libcrux_ml_dsa_simd_avx2_ntt_ntt_at_layer_0 (line 2755) | void
  function libcrux_ml_dsa_simd_avx2_ntt_ntt_avx2_ntt (line 2921) | void
  function libcrux_ml_dsa_simd_avx2_ntt_ntt (line 2932) | void
  function libcrux_ml_dsa_simd_avx2_ntt_a2 (line 2942) | void
  function libcrux_ml_dsa_simd_avx2_vector_type_Vec256_x2 (line 2949) | libcrux_ml_dsa_simd_avx2_vector_type_Vec256_x2
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_at_layer_0_round (line 2982) | void
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_at_layer_0 (line 3014) | void
  function libcrux_ml_dsa_simd_avx2_vector_type_Vec256_x2 (line 3180) | libcrux_ml_dsa_simd_avx2_vector_type_Vec256_x2
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_at_layer_1_round (line 3205) | void
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_at_layer_1 (line 3229) | void
  function libcrux_ml_dsa_simd_avx2_vector_type_Vec256_x2 (line 3331) | libcrux_ml_dsa_simd_avx2_vector_type_Vec256_x2
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_at_layer_2_round (line 3353) | void
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_at_layer_2 (line 3373) | void
  function __m256i (line 3443) | __m256i
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_99 (line 3477) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_1c (line 3499) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_6b (line 3521) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_44 (line 3543) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_a8 (line 3565) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_1f (line 3587) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_95 (line 3609) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_3b (line 3631) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_7a (line 3653) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_e4 (line 3675) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_de (line 3697) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_05 (line 3719) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_d9 (line 3741) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_3a (line 3763) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_3b0 (line 3785) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_a0 (line 3807) | void
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_at_layer_3 (line 3822) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_990 (line 3851) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_6b0 (line 3873) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_a80 (line 3895) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_950 (line 3917) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_7a0 (line 3939) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_de0 (line 3961) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_d90 (line 3983) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_3b1 (line 4005) | void
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_at_layer_4 (line 4020) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_991 (line 4041) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_a81 (line 4063) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_7a1 (line 4085) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_d91 (line 4107) | void
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_at_layer_5 (line 4122) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_992 (line 4139) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_7a2 (line 4161) | void
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_at_layer_6 (line 4176) | void
  function libcrux_ml_dsa_simd_avx2_invntt_outer_3_plus_993 (line 4191) | void
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_at_layer_7 (line 4206) | void
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_montgomery_inv_inner (line 4213) | void
  function libcrux_ml_dsa_simd_avx2_invntt_invert_ntt_montgomery (line 4234) | void
  function libcrux_ml_dsa_simd_avx2_invert_ntt_montgomery_a2 (line 4244) | void
  function libcrux_ml_dsa_simd_avx2_arithmetic_shift_left_then_reduce_c3 (line 4256) | inline void
  function libcrux_ml_dsa_simd_avx2_reduce_a2 (line 4273) | void
  function Eurydice_arr_cd0 (line 4291) | static Eurydice_arr_cd0 zero_ff_64(void)
  function KRML_MUSTINLINE (line 4310) | static KRML_MUSTINLINE bool
  function KRML_MUSTINLINE (line 4353) | static KRML_MUSTINLINE bool
  function KRML_MUSTINLINE (line 4396) | static KRML_MUSTINLINE bool
  function from_i32_array_ff_64 (line 4433) | static void
  function KRML_MUSTINLINE (line 4457) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 4720) | static KRML_MUSTINLINE void
  function Eurydice_dst_ref_mut_2a (line 4747) | static Eurydice_dst_ref_mut_2a
  type arr_30 (line 4762) | typedef struct arr_30_s { Eurydice_arr_cd0 data[16U]; } arr_30;
  function KRML_MUSTINLINE (line 4771) | static KRML_MUSTINLINE bool
  function KRML_MUSTINLINE (line 4824) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 5055) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_samplex4_avx2_matrix_flat_inner_e8_64 (line 5105) | void
  function libcrux_ml_dsa_samplex4_avx2_matrix_flat_e8_64 (line 5125) | void
  function Eurydice_dst_ref_mut_2a (line 5141) | static Eurydice_dst_ref_mut_2a array_to_slice_mut_7110(arr_30 *a)
  function Eurydice_dst_ref_mut_2a (line 5156) | static Eurydice_dst_ref_mut_2a
  function Eurydice_dst_ref_shared_2a (line 5172) | static Eurydice_dst_ref_shared_2a
  function KRML_MUSTINLINE (line 5187) | static KRML_MUSTINLINE void ntt_64(Eurydice_arr_cd0 *re)
  function KRML_MUSTINLINE (line 5199) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 5219) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 5235) | static KRML_MUSTINLINE void reduce_64(Eurydice_arr_cd0 *re)
  function KRML_MUSTINLINE (line 5247) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 5263) | static KRML_MUSTINLINE void
  function Eurydice_dst_ref_shared_2a (line 5299) | static Eurydice_dst_ref_shared_2a
  function Eurydice_dst_ref_shared_2a (line 5315) | static Eurydice_dst_ref_shared_2a
  function KRML_MUSTINLINE (line 5331) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 5352) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 5378) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_hash_functions_simd256_shake256_24 (line 5419) | void
  function libcrux_ml_dsa_hash_functions_simd256_shake256_8c_24 (line 5437) | void
  function KRML_MUSTINLINE (line 5453) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 5484) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 5509) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 5591) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_ml_dsa_generic_instantiations_avx2_ml_dsa_44_generate_key_pair__inner (line 5704) | void
  function libcrux_ml_dsa_ml_dsa_generic_instantiations_avx2_ml_dsa_44_generate_key_pair (line 5715) | void
  function KRML_MUSTINLINE (line 5734) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 5764) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 5796) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 5820) | static KRML_MUSTINLINE void
  type Option_9d (line 5853) | typedef struct Option_9d_s
  function libcrux_ml_dsa_hash_functions_simd256_shake256_x4_1b (line 5866) | void
  function libcrux_ml_dsa_hash_functions_simd256_shake256_x4_ad_1b (line 5897) | void
  function KRML_MUSTINLINE (line 5926) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_hash_functions_simd256_shake256_x4_c8 (line 5954) | void
  function libcrux_ml_dsa_hash_functions_simd256_shake256_x4_ad_c8 (line 5985) | void
  function libcrux_ml_dsa_hash_functions_simd256_shake256_c8 (line 6013) | void
  function libcrux_ml_dsa_hash_functions_simd256_shake256_8c_c8 (line 6031) | void
  function libcrux_ml_dsa_hash_functions_simd256_shake256_1b (line 6046) | void
  function libcrux_ml_dsa_hash_functions_simd256_shake256_8c_1b (line 6064) | void
  function KRML_MUSTINLINE (line 6080) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 6120) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 6216) | static KRML_MUSTINLINE void
  function Eurydice_dst_ref_shared_2a (line 6247) | static Eurydice_dst_ref_shared_2a
  function KRML_MUSTINLINE (line 6263) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 6293) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 6319) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 6350) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 6406) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 6427) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 6447) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 6464) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 6488) | static KRML_MUSTINLINE bool
  function KRML_MUSTINLINE (line 6516) | static KRML_MUSTINLINE bool
  function Eurydice_arr_c3 (line 6547) | static Eurydice_arr_c3
  function KRML_MUSTINLINE (line 6573) | static KRML_MUSTINLINE size_t
  function KRML_MUSTINLINE (line 6610) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 6640) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 6703) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 7025) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 7070) | static KRML_MUSTINLINE core_result_Result_48
  function core_result_Result_48 (line 7102) | core_result_Result_48
  function core_result_Result_48 (line 7117) | core_result_Result_48
  function core_result_Result_53 (line 7133) | core_result_Result_53
  function core_result_Result_53 (line 7154) | core_result_Result_53
  function KRML_MUSTINLINE (line 7178) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 7245) | static KRML_MUSTINLINE core_result_Result_48
  function core_result_Result_48 (line 7284) | core_result_Result_48
  function core_result_Result_48 (line 7305) | core_result_Result_48
  function deserialize_642 (line 7329) | static void
  function KRML_MUSTINLINE (line 7353) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 7381) | static KRML_MUSTINLINE core_result_Result_41
  function libcrux_ml_dsa_simd_avx2_arithmetic_shift_left_then_reduce_84 (line 7496) | inline void
  function libcrux_ml_dsa_simd_avx2_shift_left_then_reduce_a2_84 (line 7518) | void
  function KRML_MUSTINLINE (line 7531) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 7551) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 7589) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 7619) | static KRML_MUSTINLINE core_result_Result_41
  function KRML_MUSTINLINE (line 7773) | static KRML_MUSTINLINE core_result_Result_41
  function core_result_Result_41 (line 7810) | core_result_Result_41
  function core_result_Result_41 (line 7825) | core_result_Result_41
  function KRML_MUSTINLINE (line 7847) | static KRML_MUSTINLINE core_result_Result_41
  function core_result_Result_41 (line 7896) | core_result_Result_41
  function core_result_Result_41 (line 7912) | core_result_Result_41
  type arr_ad (line 7935) | typedef struct arr_ad_s { Eurydice_arr_cd0 data[11U]; } arr_ad;
  function Eurydice_dst_ref_mut_2a (line 7943) | static Eurydice_dst_ref_mut_2a array_to_slice_mut_7112(arr_ad *a)
  type arr_b7 (line 7957) | typedef struct arr_b7_s { Eurydice_arr_cd0 data[30U]; } arr_b7;
  function Eurydice_dst_ref_mut_2a (line 7965) | static Eurydice_dst_ref_mut_2a array_to_slice_mut_7113(arr_b7 *a)
  function Eurydice_dst_ref_mut_2a (line 7980) | static Eurydice_dst_ref_mut_2a
  function Eurydice_dst_ref_shared_2a (line 7996) | static Eurydice_dst_ref_shared_2a
  function Eurydice_dst_ref_shared_2a (line 8012) | static Eurydice_dst_ref_shared_2a
  function Eurydice_dst_ref_shared_2a (line 8028) | static Eurydice_dst_ref_shared_2a
  function Eurydice_dst_ref_mut_2a (line 8044) | static Eurydice_dst_ref_mut_2a
  function Eurydice_dst_ref_shared_2a (line 8060) | static Eurydice_dst_ref_shared_2a
  function KRML_MUSTINLINE (line 8076) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_ml_dsa_generic_instantiations_avx2_ml_dsa_65_generate_key_pair__inner (line 8192) | void
  function libcrux_ml_dsa_ml_dsa_generic_instantiations_avx2_ml_dsa_65_generate_key_pair (line 8203) | void
  type Option_ec (line 8220) | typedef struct Option_ec_s
  function Eurydice_dst_ref_shared_2a (line 8234) | static Eurydice_dst_ref_shared_2a
  function KRML_MUSTINLINE (line 8250) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 8569) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 8614) | static KRML_MUSTINLINE core_result_Result_8c
  function core_result_Result_8c (line 8646) | core_result_Result_8c
  function core_result_Result_8c (line 8661) | core_result_Result_8c
  function core_result_Result_53 (line 8677) | core_result_Result_53
  function core_result_Result_53 (line 8698) | core_result_Result_53
  function KRML_MUSTINLINE (line 8722) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 8789) | static KRML_MUSTINLINE core_result_Result_8c
  function core_result_Result_8c (line 8828) | core_result_Result_8c
  function core_result_Result_8c (line 8849) | core_result_Result_8c
  function KRML_MUSTINLINE (line 8879) | static KRML_MUSTINLINE core_result_Result_41
  function KRML_MUSTINLINE (line 9037) | static KRML_MUSTINLINE core_result_Result_41
  function core_result_Result_41 (line 9074) | core_result_Result_41
  function core_result_Result_41 (line 9089) | core_result_Result_41
  function KRML_MUSTINLINE (line 9111) | static KRML_MUSTINLINE core_result_Result_41
  function core_result_Result_41 (line 9160) | core_result_Result_41
  function core_result_Result_41 (line 9176) | core_result_Result_41
  type arr_34 (line 9199) | typedef struct arr_34_s { Eurydice_arr_cd0 data[15U]; } arr_34;
  function Eurydice_dst_ref_mut_2a (line 9207) | static Eurydice_dst_ref_mut_2a array_to_slice_mut_7116(arr_34 *a)
  type arr_ad0 (line 9221) | typedef struct arr_ad0_s { Eurydice_arr_cd0 data[56U]; } arr_ad0;
  function Eurydice_dst_ref_mut_2a (line 9230) | static Eurydice_dst_ref_mut_2a
  function Eurydice_dst_ref_mut_2a (line 9246) | static Eurydice_dst_ref_mut_2a
  function Eurydice_dst_ref_shared_2a (line 9262) | static Eurydice_dst_ref_shared_2a
  function Eurydice_dst_ref_shared_2a (line 9278) | static Eurydice_dst_ref_shared_2a
  function Eurydice_dst_ref_shared_2a (line 9294) | static Eurydice_dst_ref_shared_2a
  function KRML_MUSTINLINE (line 9310) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_ml_dsa_generic_instantiations_avx2_ml_dsa_87_generate_key_pair__inner (line 9426) | void
  function libcrux_ml_dsa_ml_dsa_generic_instantiations_avx2_ml_dsa_87_generate_key_pair (line 9437) | void
  type Option_c4 (line 9454) | typedef struct Option_c4_s
  function Eurydice_dst_ref_shared_2a (line 9468) | static Eurydice_dst_ref_shared_2a
  function KRML_MUSTINLINE (line 9484) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 9802) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 9847) | static KRML_MUSTINLINE core_result_Result_8b
  function core_result_Result_8b (line 9879) | core_result_Result_8b
  function core_result_Result_8b (line 9894) | core_result_Result_8b
  function core_result_Result_53 (line 9910) | core_result_Result_53
  function core_result_Result_53 (line 9931) | core_result_Result_53
  function KRML_MUSTINLINE (line 9955) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 10022) | static KRML_MUSTINLINE core_result_Result_8b
  function core_result_Result_8b (line 10061) | core_result_Result_8b
  function core_result_Result_8b (line 10082) | core_result_Result_8b
  function KRML_MUSTINLINE (line 10112) | static KRML_MUSTINLINE core_result_Result_41
  function KRML_MUSTINLINE (line 10270) | static KRML_MUSTINLINE core_result_Result_41
  function core_result_Result_41 (line 10307) | core_result_Result_41
  function core_result_Result_41 (line 10322) | core_result_Result_41
  function KRML_MUSTINLINE (line 10344) | static KRML_MUSTINLINE core_result_Result_41
  function core_result_Result_41 (line 10393) | core_result_Result_41
  function core_result_Result_41 (line 10409) | core_result_Result_41
  function libcrux_ml_dsa_simd_avx2_rejection_sample_shuffle_table_is_bit_set (line 10427) | bool
  function Eurydice_arr_0e (line 10437) | Eurydice_arr_0e
  function __m256i (line 10483) | inline __m256i

FILE: out/test-libcrux-ml-dsa/libcrux_mldsa_avx2.h
  type libcrux_sha3_avx2_x4_incremental_KeccakState (line 24) | typedef libcrux_sha3_avx2_x4_incremental_KeccakState
  type libcrux_sha3_portable_KeccakState (line 27) | typedef libcrux_sha3_portable_KeccakState libcrux_ml_dsa_hash_functions_...
  type libcrux_sha3_avx2_x4_incremental_KeccakState (line 29) | typedef libcrux_sha3_avx2_x4_incremental_KeccakState
  type __m256i (line 153) | typedef __m256i libcrux_ml_dsa_simd_avx2_vector_type_Vec256;
  type Eurydice_arr_cd0 (line 628) | typedef struct Eurydice_arr_cd0_s { __m256i data[32U]; } Eurydice_arr_cd0;
  type libcrux_ml_dsa_simd_avx2_vector_type_Vec256_x2 (line 746) | typedef struct libcrux_ml_dsa_simd_avx2_vector_type_Vec256_x2_s
  type Eurydice_dst_ref_mut_2a (line 1146) | typedef struct Eurydice_dst_ref_mut_2a_s
  type Eurydice_arr_cd0 (line 1750) | typedef Eurydice_arr_cd0 libcrux_ml_dsa_simd_avx2_vector_type_AVX2RingEl...

FILE: out/test-libcrux-ml-dsa/libcrux_mldsa_core.c
  function libcrux_ml_dsa_constants_beta (line 16) | int32_t
  function libcrux_ml_dsa_constants_commitment_ring_element_size (line 44) | size_t
  function libcrux_ml_dsa_constants_error_ring_element_size (line 52) | size_t libcrux_ml_dsa_constants_error_ring_element_size(size_t bits_per_...
  function libcrux_ml_dsa_constants_gamma1_ring_element_size (line 58) | size_t libcrux_ml_dsa_constants_gamma1_ring_element_size(size_t bits_per...
  function libcrux_ml_dsa_constants_signature_size (line 65) | size_t
  function libcrux_ml_dsa_constants_verification_key_size (line 81) | size_t libcrux_ml_dsa_constants_verification_key_size(size_t rows_in_a)
  function libcrux_ml_dsa_encoding_error_chunk_size (line 91) | size_t libcrux_ml_dsa_encoding_error_chunk_size(libcrux_ml_dsa_constants...
  function libcrux_ml_dsa_encoding_signature_set_hint (line 112) | void
  function Eurydice_mut_borrow_slice_u8 (line 128) | static Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_a2 (line 140) | Eurydice_arr_a2
  function uint8_t_x2 (line 156) | uint8_t_x2
  function KRML_MUSTINLINE (line 163) | static KRML_MUSTINLINE uint16_t generate_domain_separator(uint8_t_x2 _)
  function Eurydice_mut_borrow_slice_u8 (line 176) | static Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_48 (line 188) | Eurydice_arr_48
  function core_result_Result_a8 (line 208) | core_result_Result_a8
  function core_option_Option_b5 (line 239) | const
  function Eurydice_borrow_slice_u8 (line 254) | Eurydice_borrow_slice_u8
  function libcrux_ml_dsa_sample_inside_out_shuffle (line 260) | bool
  function Eurydice_arr_cb (line 294) | Eurydice_arr_cb libcrux_ml_dsa_pre_hash_oid_30(void)
  function zero (line 299) | zero(void)
  function Eurydice_arr_d4 (line 307) | static Eurydice_arr_d4 zero_65(void)
  function Eurydice_dst_ref_mut_fc (line 318) | static Eurydice_dst_ref_mut_fc array_to_slice_mut_a7(Eurydice_arr_d4 *a)
  function Eurydice_dst_ref_shared_fc (line 331) | Eurydice_dst_ref_shared_fc
  function KRML_MUSTINLINE (line 338) | static KRML_MUSTINLINE void
  function from_coefficient_array_65 (line 355) | static void from_coefficient_array_65(Eurydice_dst_ref_shared_fc array, ...
  function Eurydice_dst_ref_shared_fc (line 366) | static Eurydice_dst_ref_shared_fc array_to_slice_shared_a7(const Eurydic...
  function KRML_MUSTINLINE (line 374) | static KRML_MUSTINLINE void
  function to_coefficient_array_65 (line 383) | static void to_coefficient_array_65(const Eurydice_arr_d4 *value, Eurydi...
  function KRML_MUSTINLINE (line 388) | static KRML_MUSTINLINE void add(Eurydice_arr_d4 *lhs, const Eurydice_arr...
  function add_65 (line 402) | static void add_65(Eurydice_arr_d4 *lhs, const Eurydice_arr_d4 *rhs)
  function KRML_MUSTINLINE (line 407) | static KRML_MUSTINLINE void subtract(Eurydice_arr_d4 *lhs, const Eurydic...
  function subtract_65 (line 421) | static void subtract_65(Eurydice_arr_d4 *lhs, const Eurydice_arr_d4 *rhs)
  function KRML_MUSTINLINE (line 426) | static KRML_MUSTINLINE bool
  function infinity_norm_exceeds_65 (line 454) | static bool infinity_norm_exceeds_65(const Eurydice_arr_d4 *simd_unit, i...
  type int32_t_x2 (line 459) | typedef struct int32_t_x2_s
  function KRML_MUSTINLINE (line 466) | static KRML_MUSTINLINE int32_t_x2 decompose_element(int32_t gamma2, int3...
  function KRML_MUSTINLINE (line 502) | static KRML_MUSTINLINE void
  function decompose_65 (line 524) | static void
  function KRML_MUSTINLINE (line 535) | static KRML_MUSTINLINE int32_t compute_one_hint(int32_t low, int32_t hig...
  function KRML_MUSTINLINE (line 564) | static KRML_MUSTINLINE size_t
  function compute_hint_65 (line 586) | static size_t
  function KRML_MUSTINLINE (line 597) | static KRML_MUSTINLINE int32_t use_one_hint(int32_t gamma2, int32_t r, i...
  function KRML_MUSTINLINE (line 653) | static KRML_MUSTINLINE void
  function use_hint_65 (line 668) | static void
  function KRML_MUSTINLINE (line 674) | static KRML_MUSTINLINE uint64_t get_n_least_significant_bits(uint8_t n, ...
  function KRML_MUSTINLINE (line 681) | static KRML_MUSTINLINE int32_t montgomery_reduce_element(int64_t value)
  function KRML_MUSTINLINE (line 694) | static KRML_MUSTINLINE void
  function montgomery_multiply_65 (line 708) | static void montgomery_multiply_65(Eurydice_arr_d4 *lhs, const Eurydice_...
  function KRML_MUSTINLINE (line 713) | static KRML_MUSTINLINE int32_t reduce_element(int32_t fe)
  function KRML_MUSTINLINE (line 719) | static KRML_MUSTINLINE int32_t_x2 power2round_element(int32_t t)
  function KRML_MUSTINLINE (line 731) | static KRML_MUSTINLINE void power2round(Eurydice_arr_d4 *t0, Eurydice_ar...
  function power2round_65 (line 747) | static void power2round_65(Eurydice_arr_d4 *t0, Eurydice_arr_d4 *t1)
  function KRML_MUSTINLINE (line 752) | static KRML_MUSTINLINE size_t
  function rejection_sample_less_than_field_modulus_65 (line 778) | static size_t
  function KRML_MUSTINLINE (line 787) | static KRML_MUSTINLINE size_t
  function rejection_sample_less_than_eta_equals_2_65 (line 821) | static size_t
  function KRML_MUSTINLINE (line 830) | static KRML_MUSTINLINE size_t
  function rejection_sample_less_than_eta_equals_4_65 (line 860) | static size_t
  function Eurydice_dst_ref_shared_fc (line 877) | static Eurydice_dst_ref_shared_fc
  function KRML_MUSTINLINE (line 886) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 919) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 962) | static KRML_MUSTINLINE void
  function gamma1_serialize_65 (line 992) | static void
  function Eurydice_borrow_slice_u8 (line 1011) | Eurydice_borrow_slice_u8
  function KRML_MUSTINLINE (line 1018) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1052) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1093) | static KRML_MUSTINLINE void
  function gamma1_deserialize_65 (line 1119) | static void
  function KRML_MUSTINLINE (line 1129) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1150) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1175) | static KRML_MUSTINLINE void
  function commitment_serialize_65 (line 1201) | static void
  function KRML_MUSTINLINE (line 1212) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1238) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1261) | static KRML_MUSTINLINE void
  function error_serialize_65 (line 1291) | static void
  function KRML_MUSTINLINE (line 1303) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1320) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1336) | static KRML_MUSTINLINE void
  function error_deserialize_65 (line 1366) | static void
  function KRML_MUSTINLINE (line 1376) | static KRML_MUSTINLINE int32_t change_t0_interval(int32_t t0)
  function KRML_MUSTINLINE (line 1382) | static KRML_MUSTINLINE void
  function t0_serialize_65 (line 1418) | static void t0_serialize_65(const Eurydice_arr_d4 *simd_unit, Eurydice_m...
  function KRML_MUSTINLINE (line 1425) | static KRML_MUSTINLINE void
  function t0_deserialize_65 (line 1482) | static void t0_deserialize_65(Eurydice_borrow_slice_u8 serialized, Euryd...
  function KRML_MUSTINLINE (line 1487) | static KRML_MUSTINLINE void
  function t1_serialize_65 (line 1520) | static void t1_serialize_65(const Eurydice_arr_d4 *simd_unit, Eurydice_m...
  function KRML_MUSTINLINE (line 1525) | static KRML_MUSTINLINE void
  function t1_deserialize_65 (line 1557) | static void t1_deserialize_65(Eurydice_borrow_slice_u8 serialized, Euryd...
  function KRML_MUSTINLINE (line 1562) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1573) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1590) | static KRML_MUSTINLINE void outer_3_plus_99(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1599) | static KRML_MUSTINLINE void ntt_at_layer_7(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1611) | static KRML_MUSTINLINE void outer_3_plus_990(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1627) | static KRML_MUSTINLINE void outer_3_plus_7a(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1636) | static KRML_MUSTINLINE void ntt_at_layer_6(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1649) | static KRML_MUSTINLINE void outer_3_plus_991(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1665) | static KRML_MUSTINLINE void outer_3_plus_a8(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1681) | static KRML_MUSTINLINE void outer_3_plus_7a0(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1697) | static KRML_MUSTINLINE void outer_3_plus_d9(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1706) | static KRML_MUSTINLINE void ntt_at_layer_5(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1721) | static KRML_MUSTINLINE void outer_3_plus_992(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1737) | static KRML_MUSTINLINE void outer_3_plus_6b(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1753) | static KRML_MUSTINLINE void outer_3_plus_a80(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1769) | static KRML_MUSTINLINE void outer_3_plus_95(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1785) | static KRML_MUSTINLINE void outer_3_plus_7a1(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1801) | static KRML_MUSTINLINE void outer_3_plus_de(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1817) | static KRML_MUSTINLINE void outer_3_plus_d90(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1833) | static KRML_MUSTINLINE void outer_3_plus_3b(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1842) | static KRML_MUSTINLINE void ntt_at_layer_4(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1861) | static KRML_MUSTINLINE void outer_3_plus_993(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1877) | static KRML_MUSTINLINE void outer_3_plus_1c(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1893) | static KRML_MUSTINLINE void outer_3_plus_6b0(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1909) | static KRML_MUSTINLINE void outer_3_plus_44(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1925) | static KRML_MUSTINLINE void outer_3_plus_a81(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1941) | static KRML_MUSTINLINE void outer_3_plus_1f(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1957) | static KRML_MUSTINLINE void outer_3_plus_950(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1973) | static KRML_MUSTINLINE void outer_3_plus_3b0(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 1989) | static KRML_MUSTINLINE void outer_3_plus_7a2(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2005) | static KRML_MUSTINLINE void outer_3_plus_e4(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2021) | static KRML_MUSTINLINE void outer_3_plus_de0(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2037) | static KRML_MUSTINLINE void outer_3_plus_05(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2053) | static KRML_MUSTINLINE void outer_3_plus_d91(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2069) | static KRML_MUSTINLINE void outer_3_plus_3a(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2085) | static KRML_MUSTINLINE void outer_3_plus_3b1(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2101) | static KRML_MUSTINLINE void outer_3_plus_a0(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2110) | static KRML_MUSTINLINE void ntt_at_layer_3(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2130) | static KRML_MUSTINLINE int32_t montgomery_multiply_fe_by_fer(int32_t fe,...
  function KRML_MUSTINLINE (line 2135) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2143) | static KRML_MUSTINLINE void simd_unit_ntt_at_layer_2(Eurydice_arr_d4 *si...
  function KRML_MUSTINLINE (line 2151) | static KRML_MUSTINLINE void round0(Eurydice_arr_a4 *re, size_t index, in...
  function KRML_MUSTINLINE (line 2156) | static KRML_MUSTINLINE void ntt_at_layer_2(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2192) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2201) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2207) | static KRML_MUSTINLINE void ntt_at_layer_1(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2243) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2258) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2271) | static KRML_MUSTINLINE void ntt_at_layer_0(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2427) | static KRML_MUSTINLINE void ntt(Eurydice_arr_a4 *re)
  function ntt_65 (line 2442) | static void ntt_65(Eurydice_arr_a4 *simd_units)
  function KRML_MUSTINLINE (line 2447) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2455) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2470) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2483) | static KRML_MUSTINLINE void invert_ntt_at_layer_0(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2629) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2638) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2644) | static KRML_MUSTINLINE void invert_ntt_at_layer_1(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2680) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2689) | static KRML_MUSTINLINE void round5(Eurydice_arr_a4 *re, size_t index, in...
  function KRML_MUSTINLINE (line 2694) | static KRML_MUSTINLINE void invert_ntt_at_layer_2(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2737) | static KRML_MUSTINLINE void outer_3_plus_994(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2757) | static KRML_MUSTINLINE void outer_3_plus_1c0(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2777) | static KRML_MUSTINLINE void outer_3_plus_6b1(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2797) | static KRML_MUSTINLINE void outer_3_plus_440(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2817) | static KRML_MUSTINLINE void outer_3_plus_a82(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2837) | static KRML_MUSTINLINE void outer_3_plus_1f0(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2857) | static KRML_MUSTINLINE void outer_3_plus_951(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2877) | static KRML_MUSTINLINE void outer_3_plus_3b2(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2897) | static KRML_MUSTINLINE void outer_3_plus_7a3(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2917) | static KRML_MUSTINLINE void outer_3_plus_e40(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2937) | static KRML_MUSTINLINE void outer_3_plus_de1(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2957) | static KRML_MUSTINLINE void outer_3_plus_050(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2977) | static KRML_MUSTINLINE void outer_3_plus_d92(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 2997) | static KRML_MUSTINLINE void outer_3_plus_3a0(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3017) | static KRML_MUSTINLINE void outer_3_plus_3b00(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3037) | static KRML_MUSTINLINE void outer_3_plus_a00(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3050) | static KRML_MUSTINLINE void invert_ntt_at_layer_3(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3077) | static KRML_MUSTINLINE void outer_3_plus_9900(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3097) | static KRML_MUSTINLINE void outer_3_plus_6b00(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3117) | static KRML_MUSTINLINE void outer_3_plus_a800(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3137) | static KRML_MUSTINLINE void outer_3_plus_9500(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3157) | static KRML_MUSTINLINE void outer_3_plus_7a00(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3177) | static KRML_MUSTINLINE void outer_3_plus_de00(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3197) | static KRML_MUSTINLINE void outer_3_plus_d900(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3217) | static KRML_MUSTINLINE void outer_3_plus_3b10(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3230) | static KRML_MUSTINLINE void invert_ntt_at_layer_4(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3249) | static KRML_MUSTINLINE void outer_3_plus_9910(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3269) | static KRML_MUSTINLINE void outer_3_plus_a810(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3289) | static KRML_MUSTINLINE void outer_3_plus_7a10(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3309) | static KRML_MUSTINLINE void outer_3_plus_d910(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3322) | static KRML_MUSTINLINE void invert_ntt_at_layer_5(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3337) | static KRML_MUSTINLINE void outer_3_plus_9920(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3357) | static KRML_MUSTINLINE void outer_3_plus_7a20(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3370) | static KRML_MUSTINLINE void invert_ntt_at_layer_6(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3383) | static KRML_MUSTINLINE void outer_3_plus_9930(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3396) | static KRML_MUSTINLINE void invert_ntt_at_layer_7(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 3401) | static KRML_MUSTINLINE void invert_ntt_montgomery(Eurydice_arr_a4 *re)
  function invert_ntt_montgomery_65 (line 3421) | static void invert_ntt_montgomery_65(Eurydice_arr_a4 *simd_units)
  function KRML_MUSTINLINE (line 3431) | static KRML_MUSTINLINE void shift_left_then_reduce_c3(Eurydice_arr_d4 *s...
  function reduce_65 (line 3444) | static void reduce_65(Eurydice_arr_a4 *simd_units)
  function Eurydice_arr_38 (line 3464) | const Eurydice_arr_38 *libcrux_ml_dsa_types_as_ref_c5_c2(const Eurydice_...
  function Eurydice_arr_51 (line 3480) | const Eurydice_arr_51 *libcrux_ml_dsa_types_as_ref_7f_d8(const Eurydice_...
  function Eurydice_arr_180 (line 3496) | const Eurydice_arr_180 *libcrux_ml_dsa_types_as_ref_9b_32(const Eurydice...
  function Eurydice_arr_51 (line 3512) | Eurydice_arr_51 libcrux_ml_dsa_types_new_7f_d8(Eurydice_arr_51 value)
  function Eurydice_arr_180 (line 3528) | Eurydice_arr_180 libcrux_ml_dsa_types_new_9b_32(Eurydice_arr_180 value)
  function Eurydice_arr_400 (line 3544) | const Eurydice_arr_400 *libcrux_ml_dsa_types_as_ref_c5_1a(const Eurydice...
  function Eurydice_arr_40 (line 3560) | const Eurydice_arr_40 *libcrux_ml_dsa_types_as_ref_7f_db(const Eurydice_...
  function Eurydice_arr_18 (line 3576) | const Eurydice_arr_18 *libcrux_ml_dsa_types_as_ref_9b_ff(const Eurydice_...
  function Eurydice_arr_40 (line 3592) | Eurydice_arr_40 libcrux_ml_dsa_types_new_7f_db(Eurydice_arr_40 value)
  function Eurydice_arr_18 (line 3608) | Eurydice_arr_18 libcrux_ml_dsa_types_new_9b_ff(Eurydice_arr_18 value)
  function Eurydice_arr_96 (line 3624) | const Eurydice_arr_96 *libcrux_ml_dsa_types_as_ref_c5_fa(const Eurydice_...
  function Eurydice_arr_4a (line 3640) | const Eurydice_arr_4a *libcrux_ml_dsa_types_as_ref_7f_97(const Eurydice_...
  function Eurydice_arr_d1 (line 3656) | const Eurydice_arr_d1 *libcrux_ml_dsa_types_as_ref_9b_09(const Eurydice_...
  function Eurydice_arr_4a (line 3672) | Eurydice_arr_4a libcrux_ml_dsa_types_new_7f_97(Eurydice_arr_4a value)
  function Eurydice_arr_d1 (line 3688) | Eurydice_arr_d1 libcrux_ml_dsa_types_new_9b_09(Eurydice_arr_d1 value)
  function Eurydice_borrow_slice_u8 (line 3699) | Eurydice_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 3712) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 3730) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_46(Eurydice_arr...
  function Eurydice_borrow_slice_u8 (line 3744) | Eurydice_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 3757) | Eurydice_mut_borrow_slice_u8
  function Eurydice_borrow_slice_u8 (line 3775) | Eurydice_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 3788) | Eurydice_mut_borrow_slice_u8
  function Eurydice_dst_ref_mut_fc (line 3805) | Eurydice_dst_ref_mut_fc
  function Eurydice_borrow_slice_u8 (line 3818) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_46(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 3832) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_subslice_to_mut_6e(Eurydi...
  function Eurydice_borrow_slice_u8 (line 3846) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_24(const Eurydic...
  function Eurydice_borrow_slice_u8 (line 3860) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_f7(const Eurydic...
  function Eurydice_borrow_slice_u8 (line 3874) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_e2(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 3888) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_24(Eurydice_arr...
  function Eurydice_dst_ref_shared_22 (line 3902) | Eurydice_dst_ref_shared_22 Eurydice_array_to_slice_shared_6d1(const Eury...
  function Eurydice_dst_ref_mut_22 (line 3916) | Eurydice_dst_ref_mut_22 Eurydice_array_to_slice_mut_6d1(Eurydice_arr_fb *a)
  function Eurydice_borrow_slice_u8 (line 3930) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_fd(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 3944) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_fd(Eurydice_arr...
  function Eurydice_dst_ref_shared_e7 (line 3958) | Eurydice_dst_ref_shared_e7 Eurydice_array_to_slice_shared_718(const Eury...
  function Eurydice_arr_38 (line 3977) | Eurydice_arr_38 libcrux_ml_dsa_types_zero_c5_c2(void)
  function Eurydice_mut_borrow_slice_u8 (line 3988) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_f7(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 4002) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_e2(Eurydice_arr...
  function Eurydice_dst_ref_shared_e7 (line 4016) | Eurydice_dst_ref_shared_e7 Eurydice_array_to_slice_shared_717(const Eury...
  function Eurydice_dst_ref_shared_e7 (line 4030) | Eurydice_dst_ref_shared_e7 Eurydice_array_to_slice_shared_716(const Eury...
  function Eurydice_dst_ref_shared_e7 (line 4044) | Eurydice_dst_ref_shared_e7
  function Eurydice_dst_ref_mut_e7 (line 4059) | Eurydice_dst_ref_mut_e7 Eurydice_array_to_slice_mut_718(Eurydice_arr_25 *a)
  function Eurydice_dst_ref_mut_e7 (line 4073) | Eurydice_dst_ref_mut_e7 Eurydice_array_to_slice_mut_717(Eurydice_arr_46 *a)
  function Eurydice_dst_ref_mut_e7 (line 4087) | Eurydice_dst_ref_mut_e7 Eurydice_array_to_slice_mut_716(Eurydice_arr_f8 *a)
  function Eurydice_borrow_slice_u8 (line 4101) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_ee0(const Eurydi...
  function Eurydice_borrow_slice_u8 (line 4115) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_5b(const Eurydic...
  function Eurydice_borrow_slice_u8 (line 4129) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_ef(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 4143) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_ee0(Eurydice_ar...
  function Eurydice_dst_ref_shared_22 (line 4157) | Eurydice_dst_ref_shared_22 Eurydice_array_to_slice_shared_6d0(const Eury...
  function Eurydice_dst_ref_mut_22 (line 4171) | Eurydice_dst_ref_mut_22 Eurydice_array_to_slice_mut_6d0(Eurydice_arr_b5 *a)
  function Eurydice_borrow_slice_u8 (line 4185) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_95(const Eurydic...
  function Eurydice_dst_ref_shared_e7 (line 4199) | Eurydice_dst_ref_shared_e7 Eurydice_array_to_slice_shared_715(const Eury...
  function Eurydice_arr_96 (line 4218) | Eurydice_arr_96 libcrux_ml_dsa_types_zero_c5_fa(void)
  function Eurydice_mut_borrow_slice_u8 (line 4229) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_5b(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 4243) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_ef(Eurydice_arr...
  function Eurydice_dst_ref_shared_e7 (line 4257) | Eurydice_dst_ref_shared_e7 Eurydice_array_to_slice_shared_714(const Eury...
  function Eurydice_dst_ref_mut_e7 (line 4271) | Eurydice_dst_ref_mut_e7 Eurydice_array_to_slice_mut_715(Eurydice_arr_a3 *a)
  function Eurydice_dst_ref_shared_e7 (line 4285) | Eurydice_dst_ref_shared_e7 Eurydice_array_to_slice_shared_713(const Eury...
  function Eurydice_dst_ref_shared_e7 (line 4299) | Eurydice_dst_ref_shared_e7 Eurydice_array_to_slice_shared_712(const Eury...
  function Eurydice_dst_ref_shared_e7 (line 4313) | Eurydice_dst_ref_shared_e7
  function Eurydice_dst_ref_mut_e7 (line 4328) | Eurydice_dst_ref_mut_e7 Eurydice_array_to_slice_mut_714(Eurydice_arr_b0 *a)
  function Eurydice_dst_ref_mut_e7 (line 4342) | Eurydice_dst_ref_mut_e7 Eurydice_array_to_slice_mut_713(Eurydice_arr_a1 *a)
  function Eurydice_dst_ref_mut_e7 (line 4356) | Eurydice_dst_ref_mut_e7 Eurydice_array_to_slice_mut_712(Eurydice_arr_58 *a)
  function Eurydice_arr_a4 (line 4373) | Eurydice_arr_a4 libcrux_ml_dsa_polynomial_zero_ff_37(void)
  function libcrux_ml_dsa_polynomial_from_i32_array_ff_37 (line 4394) | void
  function Eurydice_dst_ref_shared_fc (line 4420) | Eurydice_dst_ref_shared_fc Eurydice_array_to_slice_shared_200(const Eury...
  function libcrux_ml_dsa_arithmetic_use_hint_37 (line 4434) | void
  function KRML_MUSTINLINE (line 4462) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 4481) | static KRML_MUSTINLINE void add_ff_37(Eurydice_arr_a4 *self, const Euryd...
  function KRML_MUSTINLINE (line 4495) | static KRML_MUSTINLINE void shift_left_then_reduce_84(Eurydice_arr_d4 *s...
  function shift_left_then_reduce_65_84 (line 4513) | static void shift_left_then_reduce_65_84(Eurydice_arr_d4 *simd_unit)
  function KRML_MUSTINLINE (line 4524) | static KRML_MUSTINLINE void shift_left_then_reduce_68(Eurydice_arr_a4 *re)
  function libcrux_ml_dsa_ntt_ntt_37 (line 4539) | void libcrux_ml_dsa_ntt_ntt_37(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 4553) | static KRML_MUSTINLINE void subtract_ff_37(Eurydice_arr_a4 *self, const ...
  function KRML_MUSTINLINE (line 4568) | static KRML_MUSTINLINE void reduce_37(Eurydice_arr_a4 *re)
  function KRML_MUSTINLINE (line 4579) | static KRML_MUSTINLINE void invert_ntt_montgomery_37(Eurydice_arr_a4 *re)
  function libcrux_ml_dsa_matrix_compute_w_approx_37 (line 4593) | void
  function Eurydice_borrow_slice_u8 (line 4630) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_180(const Eurydi...
  function Eurydice_mut_borrow_slice_u8 (line 4643) | Eurydice_mut_borrow_slice_u8
  function libcrux_ml_dsa_encoding_gamma1_deserialize_37 (line 4658) | void
  function core_result_Result_41 (line 4686) | core_result_Result_41
  function deserialize_37 (line 4802) | static void deserialize_37(Eurydice_borrow_slice_u8 serialized, Eurydice...
  function libcrux_ml_dsa_encoding_verification_key_deserialize_37 (line 4824) | void
  function Eurydice_borrow_slice_u8 (line 4852) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_bb(const Eurydic...
  function Eurydice_borrow_slice_u8 (line 4866) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_59(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 4880) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_180(Eurydice_ar...
  function Eurydice_dst_ref_shared_22 (line 4894) | Eurydice_dst_ref_shared_22 Eurydice_array_to_slice_shared_6d(const Euryd...
  function KRML_MUSTINLINE (line 4908) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_encoding_signature_serialize_37 (line 4937) | void
  function Eurydice_dst_ref_mut_22 (line 4999) | Eurydice_dst_ref_mut_22 Eurydice_array_to_slice_mut_6d(Eurydice_arr_83 *a)
  function Eurydice_dst_ref_mut_fc (line 5013) | Eurydice_dst_ref_mut_fc
  function Eurydice_arr_c3 (line 5029) | static Eurydice_arr_c3 to_i32_array_ff_37(const Eurydice_arr_a4 *self)
  function libcrux_ml_dsa_arithmetic_make_hint_37 (line 5053) | size_t
  function KRML_MUSTINLINE (line 5092) | static KRML_MUSTINLINE bool
  function libcrux_ml_dsa_arithmetic_vector_infinity_norm_exceeds_37 (line 5119) | bool
  function libcrux_ml_dsa_matrix_subtract_vectors_37 (line 5149) | void
  function libcrux_ml_dsa_matrix_add_vectors_37 (line 5169) | void
  function libcrux_ml_dsa_matrix_vector_times_ring_element_37 (line 5189) | void
  function Eurydice_borrow_slice_u8 (line 5209) | Eurydice_borrow_slice_u8
  function Eurydice_borrow_slice_u8 (line 5222) | Eurydice_borrow_slice_u8
  function Eurydice_borrow_slice_u8 (line 5235) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_ee(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 5249) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_ee(Eurydice_arr...
  function KRML_MUSTINLINE (line 5263) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_encoding_commitment_serialize_vector_37 (line 5288) | void
  function libcrux_ml_dsa_arithmetic_decompose_vector_37 (line 5318) | void
  function Eurydice_dst_ref_shared_e7 (line 5344) | Eurydice_dst_ref_shared_e7 Eurydice_array_to_slice_shared_711(const Eury...
  function libcrux_ml_dsa_matrix_compute_matrix_x_mask_37 (line 5361) | void
  function Eurydice_borrow_slice_u8 (line 5391) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_7d0(const Eurydi...
  function Eurydice_mut_borrow_slice_u8 (line 5405) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_7d(Eurydice_arr...
  function Eurydice_borrow_slice_u8 (line 5419) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_fa(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 5433) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_fa(Eurydice_arr...
  function Eurydice_borrow_slice_u8 (line 5447) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_da(const Eurydic...
  function core_option_is_some_cd_4e (line 5476) | bool core_option_is_some_cd_4e(const core_option_Option_b5 *self)
  function Eurydice_borrow_slice_u8 (line 5487) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_07(const Eurydic...
  function KRML_MUSTINLINE (line 5501) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_encoding_t0_deserialize_to_vector_then_ntt_37 (line 5524) | void
  function KRML_MUSTINLINE (line 5558) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_encoding_error_deserialize_to_vector_then_ntt_37 (line 5587) | void
  function Eurydice_arr_400 (line 5623) | Eurydice_arr_400 libcrux_ml_dsa_types_zero_c5_1a(void)
  function Eurydice_mut_borrow_slice_u8 (line 5634) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_bb(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 5648) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_59(Eurydice_arr...
  function libcrux_ml_dsa_encoding_t0_serialize_37 (line 5662) | void
  function libcrux_ml_dsa_encoding_error_serialize_37 (line 5689) | void
  function Eurydice_borrow_slice_u8 (line 5719) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_d8(const Eurydic...
  function KRML_MUSTINLINE (line 5733) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_encoding_verification_key_generate_serialized_37 (line 5758) | void
  function libcrux_ml_dsa_arithmetic_power2round_vector_37 (line 5799) | void
  function Eurydice_dst_ref_shared_e7 (line 5822) | Eurydice_dst_ref_shared_e7 Eurydice_array_to_slice_shared_710(const Eury...
  function Eurydice_dst_ref_shared_e7 (line 5836) | Eurydice_dst_ref_shared_e7 Eurydice_array_to_slice_shared_71(const Euryd...
  function libcrux_ml_dsa_matrix_compute_as1_plus_s2_37 (line 5853) | void
  function Eurydice_dst_ref_shared_e7 (line 5888) | Eurydice_dst_ref_shared_e7
  function Eurydice_dst_ref_mut_e7 (line 5903) | Eurydice_dst_ref_mut_e7 Eurydice_array_to_slice_mut_711(Eurydice_arr_a80...
  function Eurydice_dst_ref_mut_e7 (line 5917) | Eurydice_dst_ref_mut_e7 Eurydice_array_to_slice_mut_710(Eurydice_arr_66 *a)
  function Eurydice_dst_ref_mut_4c (line 5931) | Eurydice_dst_ref_mut_4c Eurydice_array_to_slice_mut_f6(Eurydice_arr_380 *a)
  function Eurydice_borrow_slice_u8 (line 5945) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_a8(const Eurydic...
  function Eurydice_dst_ref_mut_fc (line 5959) | Eurydice_dst_ref_mut_fc Eurydice_array_to_subslice_from_mut_96(Eurydice_...
  function libcrux_ml_dsa_sample_rejection_sample_less_than_field_modulus_37 (line 5971) | bool
  function Eurydice_borrow_slice_u8 (line 6013) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_8d(const Eurydic...
  function Eurydice_dst_ref_mut_e7 (line 6027) | Eurydice_dst_ref_mut_e7 Eurydice_array_to_slice_mut_71(Eurydice_arr_db *a)
  function Eurydice_dst_ref_shared_fc (line 6041) | Eurydice_dst_ref_shared_fc Eurydice_array_to_slice_shared_20(const Euryd...
  function KRML_MUSTINLINE (line 6055) | static KRML_MUSTINLINE bool
  function KRML_MUSTINLINE (line 6097) | static KRML_MUSTINLINE bool
  function libcrux_ml_dsa_sample_rejection_sample_less_than_eta_37 (line 6139) | bool
  function Eurydice_borrow_slice_u8 (line 6172) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_39(const Eurydic...
  function Eurydice_borrow_slice_u8 (line 6186) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_18(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 6200) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_18(Eurydice_arr...
  function Eurydice_borrow_slice_u8 (line 6214) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_26(const Eurydic...
  function Eurydice_borrow_slice_u8 (line 6228) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_6e(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 6242) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_7b(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 6256) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_a8(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 6270) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_d4(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 6284) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_95(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 6298) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_c0(Eurydice_arr...
  function Eurydice_borrow_slice_u8 (line 6312) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_9c(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 6326) | Eurydice_mut_borrow_slice_u8
  function Eurydice_borrow_slice_u8 (line 6344) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_d1(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 6358) | Eurydice_mut_borrow_slice_u8
  function Eurydice_borrow_slice_u8 (line 6376) | Eurydice_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 6389) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_6e(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 6403) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 6421) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_d8(Eurydice_arr...
  function Eurydice_borrow_slice_u8 (line 6435) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_7d(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 6449) | Eurydice_mut_borrow_slice_u8
  function Eurydice_borrow_slice_u8 (line 6466) | Eurydice_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 6478) | Eurydice_mut_borrow_slice_u8
  function Eurydice_borrow_slice_u8 (line 6491) | Eurydice_borrow_slice_u8
  function Eurydice_borrow_slice_u8 (line 6506) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_41(const Eurydic...
  function Eurydice_borrow_slice_u8 (line 6520) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_d4(const Eurydic...
  function Eurydice_mut_borrow_slice_u8 (line 6534) | Eurydice_mut_borrow_slice_u8
  function Eurydice_borrow_slice_u8 (line 6552) | Eurydice_borrow_slice_u8 Eurydice_array_to_slice_shared_7b(const Eurydic...
  function Eurydice_array_u8x8 (line 6568) | Eurydice_array_u8x8 core_result_unwrap_26_ab(core_result_Result_8e self)
  function Eurydice_mut_borrow_slice_u8 (line 6587) | Eurydice_mut_borrow_slice_u8

FILE: out/test-libcrux-ml-dsa/libcrux_mldsa_core.h
  type core_option_Option_08_tags (line 21) | typedef uint8_t core_option_Option_08_tags;
  type core_option_Option_08 (line 28) | typedef struct core_option_Option_08_s
  type core_ops_range_Range_08 (line 46) | typedef struct core_ops_range_Range_08_s
  type libcrux_ml_dsa_constants_Eta (line 56) | typedef uint8_t libcrux_ml_dsa_constants_Eta;
  type libcrux_ml_dsa_types_VerificationError (line 67) | typedef uint8_t libcrux_ml_dsa_types_VerificationError;
  type libcrux_ml_dsa_types_SigningError (line 72) | typedef uint8_t libcrux_ml_dsa_types_SigningError;
  type core_result_Result_a8_tags (line 77) | typedef uint8_t core_result_Result_a8_tags;
  type Eurydice_arr_d4 (line 85) | typedef struct Eurydice_arr_d4_s { int32_t data[8U]; } Eurydice_arr_d4;
  type Eurydice_dst_ref_shared_fc (line 92) | typedef struct Eurydice_dst_ref_shared_fc_s
  type Eurydice_dst_ref_mut_fc (line 104) | typedef struct Eurydice_dst_ref_mut_fc_s
  type Eurydice_arr_a4 (line 125) | typedef struct Eurydice_arr_a4_s { Eurydice_arr_d4 data[32U]; } Eurydice...
  type Eurydice_arr_18 (line 133) | typedef struct Eurydice_arr_18_s { uint8_t data[2560U]; } Eurydice_arr_18;
  type Eurydice_arr_40 (line 141) | typedef struct Eurydice_arr_40_s { uint8_t data[1312U]; } Eurydice_arr_40;
  type Eurydice_arr_d1 (line 149) | typedef struct Eurydice_arr_d1_s { uint8_t data[4032U]; } Eurydice_arr_d1;
  type Eurydice_arr_4a (line 157) | typedef struct Eurydice_arr_4a_s { uint8_t data[1952U]; } Eurydice_arr_4a;
  type Eurydice_arr_180 (line 165) | typedef struct Eurydice_arr_180_s { uint8_t data[4896U]; } Eurydice_arr_...
  type Eurydice_arr_51 (line 173) | typedef struct Eurydice_arr_51_s { uint8_t data[2592U]; } Eurydice_arr_51;
  type Eurydice_arr_38 (line 181) | typedef struct Eurydice_arr_38_s { uint8_t data[4627U]; } Eurydice_arr_38;
  type Eurydice_arr_400 (line 189) | typedef struct Eurydice_arr_400_s { uint8_t data[2420U]; } Eurydice_arr_...
  type Eurydice_arr_96 (line 197) | typedef struct Eurydice_arr_96_s { uint8_t data[3309U]; } Eurydice_arr_96;
  type Eurydice_arr_88 (line 205) | typedef struct Eurydice_arr_88_s { uint8_t data[16U]; } Eurydice_arr_88;
  type Eurydice_arr_0e (line 213) | typedef struct Eurydice_arr_0e_s { Eurydice_arr_88 data[16U]; } Eurydice...
  type Eurydice_arr_60 (line 221) | typedef struct Eurydice_arr_60_s { uint8_t data[32U]; } Eurydice_arr_60;
  type core_result_Result_8b (line 228) | typedef struct core_result_Result_8b_s
  type Eurydice_arr_060 (line 245) | typedef struct Eurydice_arr_060_s { uint8_t data[64U]; } Eurydice_arr_060;
  type Eurydice_dst_ref_mut_e7 (line 252) | typedef struct Eurydice_dst_ref_mut_e7_s
  type core_result_Result_8c (line 264) | typedef struct core_result_Result_8c_s
  type Eurydice_arr_5f (line 281) | typedef struct Eurydice_arr_5f_s { uint8_t data[48U]; } Eurydice_arr_5f;
  type core_result_Result_41 (line 288) | typedef struct core_result_Result_41_s
  type core_result_Result_48 (line 308) | typedef struct core_result_Result_48_s
  type core_result_Result_53 (line 324) | typedef struct core_result_Result_53_s
  type Eurydice_arr_3d (line 337) | typedef struct Eurydice_arr_3d_s { uint8_t data[136U]; } Eurydice_arr_3d;
  type Eurydice_arr_c30 (line 345) | typedef struct Eurydice_arr_c30_s { uint8_t data[640U]; } Eurydice_arr_c30;
  type Eurydice_arr_5f0 (line 353) | typedef struct Eurydice_arr_5f0_s { uint8_t data[576U]; } Eurydice_arr_5f0;
  type Eurydice_arr_12 (line 361) | typedef struct Eurydice_arr_12_s { uint8_t data[840U]; } Eurydice_arr_12;
  type Eurydice_arr_27 (line 369) | typedef struct Eurydice_arr_27_s { uint8_t data[168U]; } Eurydice_arr_27;
  type Eurydice_arr_27_x4 (line 371) | typedef struct Eurydice_arr_27_x4_s
  type Eurydice_arr_3d_x4 (line 380) | typedef struct Eurydice_arr_3d_x4_s
  type Eurydice_arr_f1 (line 403) | typedef struct Eurydice_arr_f1_s { uint8_t data[28U]; } Eurydice_arr_f1;
  type Eurydice_arr_181 (line 419) | typedef struct Eurydice_arr_181_s { uint8_t data[104U]; } Eurydice_arr_181;
  type Eurydice_arr_a8 (line 444) | typedef struct Eurydice_arr_a8_s { uint8_t data[144U]; } Eurydice_arr_a8;
  type Eurydice_arr_a5 (line 511) | typedef struct Eurydice_arr_a5_s { uint64_t data[5U]; } Eurydice_arr_a5;
  type size_t_x2 (line 513) | typedef struct size_t_x2_s
  type Eurydice_arr_06 (line 526) | typedef struct Eurydice_arr_06_s { Eurydice_borrow_slice_u8 data[1U]; } ...
  type core_result_Result_8e (line 541) | typedef struct core_result_Result_8e_s
  type Eurydice_arr_a7 (line 577) | typedef struct Eurydice_arr_a7_s { uint64_t data[24U]; } Eurydice_arr_a7;
  type Eurydice_arr_3e (line 585) | typedef struct Eurydice_arr_3e_s { Eurydice_arr_3d data[1U]; } Eurydice_...
  type Eurydice_arr_26 (line 593) | typedef struct Eurydice_arr_26_s { uint64_t data[25U]; } Eurydice_arr_26;
  type libcrux_ml_dsa_ml_dsa_generic_ml_dsa_87_MLDSA87KeyPair (line 595) | typedef struct libcrux_ml_dsa_ml_dsa_generic_ml_dsa_87_MLDSA87KeyPair_s
  type libcrux_ml_dsa_ml_dsa_generic_ml_dsa_65_MLDSA65KeyPair (line 602) | typedef struct libcrux_ml_dsa_ml_dsa_generic_ml_dsa_65_MLDSA65KeyPair_s
  type libcrux_ml_dsa_ml_dsa_generic_ml_dsa_44_MLDSA44KeyPair (line 609) | typedef struct libcrux_ml_dsa_ml_dsa_generic_ml_dsa_44_MLDSA44KeyPair_s

FILE: out/test-libcrux-ml-dsa/libcrux_mldsa_portable.c
  function KRML_MUSTINLINE (line 16) | KRML_MUSTINLINE libcrux_ml_dsa_hash_functions_portable_Shake128X4
  function KRML_MUSTINLINE (line 43) | KRML_MUSTINLINE Eurydice_arr_26
  function KRML_MUSTINLINE (line 53) | KRML_MUSTINLINE libcrux_ml_dsa_hash_functions_portable_Shake256X4
  function KRML_MUSTINLINE (line 80) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 89) | KRML_MUSTINLINE Eurydice_arr_3d
  function KRML_MUSTINLINE (line 98) | KRML_MUSTINLINE Eurydice_arr_3d_x4
  function KRML_MUSTINLINE (line 119) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 138) | KRML_MUSTINLINE Eurydice_arr_27_x4
  function KRML_MUSTINLINE (line 159) | KRML_MUSTINLINE Eurydice_arr_3d
  function KRML_MUSTINLINE (line 168) | KRML_MUSTINLINE Eurydice_arr_3d_x4
  function KRML_MUSTINLINE (line 192) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 204) | KRML_MUSTINLINE libcrux_ml_dsa_hash_functions_portable_Shake128X4
  function KRML_MUSTINLINE (line 218) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 233) | KRML_MUSTINLINE Eurydice_arr_27_x4
  function KRML_MUSTINLINE (line 244) | KRML_MUSTINLINE Eurydice_arr_26
  function KRML_MUSTINLINE (line 253) | KRML_MUSTINLINE Eurydice_arr_3d
  function KRML_MUSTINLINE (line 262) | KRML_MUSTINLINE Eurydice_arr_3d
  function libcrux_ml_dsa_hash_functions_portable_absorb_26 (line 271) | void
  function libcrux_ml_dsa_hash_functions_portable_absorb_final_26 (line 283) | void
  function libcrux_sha3_generic_keccak_xof_KeccakXofState_e2 (line 295) | libcrux_sha3_generic_keccak_xof_KeccakXofState_e2
  function libcrux_ml_dsa_hash_functions_portable_squeeze_26 (line 304) | void
  function KRML_MUSTINLINE (line 316) | KRML_MUSTINLINE libcrux_ml_dsa_hash_functions_portable_Shake256X4
  function KRML_MUSTINLINE (line 330) | KRML_MUSTINLINE Eurydice_arr_3d_x4
  function KRML_MUSTINLINE (line 341) | KRML_MUSTINLINE Eurydice_arr_3d_x4
  function KRML_MUSTINLINE (line 355) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 618) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 654) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 884) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_samplex4_portable_matrix_flat_a8_37 (line 933) | void
  function KRML_MUSTINLINE (line 948) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 965) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 980) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1062) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_ml_dsa_generic_instantiations_portable_ml_dsa_44_generate_key_pair (line 1193) | void
  function libcrux_ml_dsa_ml_dsa_generic_derive_message_representative_43 (line 1233) | void
  function KRML_MUSTINLINE (line 1289) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1306) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1329) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1346) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1372) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1389) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1404) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1447) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1555) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1611) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 1962) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 2006) | static KRML_MUSTINLINE core_result_Result_48
  function core_result_Result_48 (line 2040) | core_result_Result_48
  function core_result_Result_53 (line 2054) | core_result_Result_53
  function libcrux_ml_dsa_pre_hash_hash_30_83 (line 2080) | void
  function KRML_MUSTINLINE (line 2095) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 2161) | static KRML_MUSTINLINE core_result_Result_48
  function core_result_Result_48 (line 2202) | core_result_Result_48
  function KRML_MUSTINLINE (line 2231) | static KRML_MUSTINLINE core_result_Result_41
  function KRML_MUSTINLINE (line 2394) | static KRML_MUSTINLINE core_result_Result_41
  function core_result_Result_41 (line 2433) | core_result_Result_41
  function KRML_MUSTINLINE (line 2450) | static KRML_MUSTINLINE core_result_Result_41
  function core_result_Result_41 (line 2501) | core_result_Result_41
  function KRML_MUSTINLINE (line 2519) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_ml_dsa_generic_instantiations_portable_ml_dsa_65_generate_key_pair (line 2649) | void
  function KRML_MUSTINLINE (line 2667) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 3015) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 3059) | static KRML_MUSTINLINE core_result_Result_8c
  function core_result_Result_8c (line 3093) | core_result_Result_8c
  function core_result_Result_53 (line 3107) | core_result_Result_53
  function KRML_MUSTINLINE (line 3130) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 3196) | static KRML_MUSTINLINE core_result_Result_8c
  function core_result_Result_8c (line 3237) | core_result_Result_8c
  function KRML_MUSTINLINE (line 3266) | static KRML_MUSTINLINE core_result_Result_41
  function KRML_MUSTINLINE (line 3433) | static KRML_MUSTINLINE core_result_Result_41
  function core_result_Result_41 (line 3472) | core_result_Result_41
  function KRML_MUSTINLINE (line 3489) | static KRML_MUSTINLINE core_result_Result_41
  function core_result_Result_41 (line 3540) | core_result_Result_41
  function KRML_MUSTINLINE (line 3558) | static KRML_MUSTINLINE void
  function libcrux_ml_dsa_ml_dsa_generic_instantiations_portable_ml_dsa_87_generate_key_pair (line 3688) | void
  function KRML_MUSTINLINE (line 3706) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 4054) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 4098) | static KRML_MUSTINLINE core_result_Result_8b
  function core_result_Result_8b (line 4132) | core_result_Result_8b
  function core_result_Result_53 (line 4146) | core_result_Result_53
  function KRML_MUSTINLINE (line 4169) | static KRML_MUSTINLINE core_result_Result_53
  function KRML_MUSTINLINE (line 4235) | static KRML_MUSTINLINE core_result_Result_8b
  function core_result_Result_8b (line 4276) | core_result_Result_8b
  function KRML_MUSTINLINE (line 4305) | static KRML_MUSTINLINE core_result_Result_41
  function KRML_MUSTINLINE (line 4472) | static KRML_MUSTINLINE core_result_Result_41
  function core_result_Result_41 (line 4511) | core_result_Result_41
  function KRML_MUSTINLINE (line 4528) | static KRML_MUSTINLINE core_result_Result_41
  function core_result_Result_41 (line 4579) | core_result_Result_41

FILE: out/test-libcrux-ml-dsa/libcrux_mldsa_portable.h
  type libcrux_ml_dsa_hash_functions_portable_Shake128X4 (line 21) | typedef struct libcrux_ml_dsa_hash_functions_portable_Shake128X4_s
  type libcrux_sha3_portable_KeccakState (line 30) | typedef libcrux_sha3_portable_KeccakState libcrux_ml_dsa_hash_functions_...
  type libcrux_ml_dsa_hash_functions_portable_Shake256X4 (line 32) | typedef struct libcrux_ml_dsa_hash_functions_portable_Shake256X4_s
  type libcrux_sha3_portable_incremental_Shake256Xof (line 41) | typedef libcrux_sha3_portable_incremental_Shake256Xof

FILE: out/test-libcrux-ml-dsa/libcrux_sha3.h
  function KRML_MUSTINLINE (line 24) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 36) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 48) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 60) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 72) | static KRML_MUSTINLINE void
  function libcrux_sha3_sha224_ema (line 87) | static inline void
  function Eurydice_arr_f1 (line 96) | static inline Eurydice_arr_f1 libcrux_sha3_sha224(Eurydice_borrow_slice_...
  function libcrux_sha3_sha256_ema (line 106) | static inline void
  function Eurydice_arr_60 (line 115) | static inline Eurydice_arr_60 libcrux_sha3_sha256(Eurydice_borrow_slice_...
  function libcrux_sha3_sha384_ema (line 125) | static inline void
  function Eurydice_arr_5f (line 134) | static inline Eurydice_arr_5f libcrux_sha3_sha384(Eurydice_borrow_slice_...
  function libcrux_sha3_shake128_ema (line 146) | static inline void
  function libcrux_sha3_shake256_ema (line 157) | static inline void

FILE: out/test-libcrux-ml-dsa/libcrux_sha3_avx2.c
  function KRML_MUSTINLINE (line 17) | static KRML_MUSTINLINE __m256i zero_b0(void)
  function KRML_MUSTINLINE (line 22) | static KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 34) | static KRML_MUSTINLINE __m256i xor5_b0(__m256i a, __m256i b, __m256i c, ...
  function KRML_MUSTINLINE (line 45) | static KRML_MUSTINLINE __m256i rotate_left_76(__m256i x)
  function KRML_MUSTINLINE (line 52) | static KRML_MUSTINLINE __m256i _vrax1q_u64(__m256i a, __m256i b)
  function KRML_MUSTINLINE (line 60) | static KRML_MUSTINLINE __m256i rotate_left1_and_xor_b0(__m256i a, __m256...
  function KRML_MUSTINLINE (line 65) | static KRML_MUSTINLINE __m256i _vbcaxq_u64(__m256i a, __m256i b, __m256i c)
  function KRML_MUSTINLINE (line 73) | static KRML_MUSTINLINE __m256i and_not_xor_b0(__m256i a, __m256i b, __m2...
  function KRML_MUSTINLINE (line 78) | static KRML_MUSTINLINE __m256i _veorq_n_u64(__m256i a, uint64_t c)
  function KRML_MUSTINLINE (line 87) | static KRML_MUSTINLINE __m256i xor_constant_b0(__m256i a, uint64_t c)
  function KRML_MUSTINLINE (line 95) | static KRML_MUSTINLINE __m256i xor_b0(__m256i a, __m256i b)
  function libcrux_sha3_generic_keccak_new_80_a6 (line 109) | libcrux_sha3_generic_keccak_new_80_a6(void)
  function Eurydice_arr_05 (line 124) | Eurydice_arr_05 libcrux_sha3_avx2_x4_incremental_init(void)
  function KRML_MUSTINLINE (line 135) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 147) | KRML_MUSTINLINE const
  function KRML_MUSTINLINE (line 159) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 314) | static KRML_MUSTINLINE void
  function load_last_8f_c6 (line 357) | static void
  function __m256i (line 372) | const
  function KRML_MUSTINLINE (line 388) | KRML_MUSTINLINE Eurydice_arr_c0 libcrux_sha3_generic_keccak_theta_80_a6(...

FILE: out/test-libcrux-ml-dsa/libcrux_sha3_avx2.h
  type Eurydice_arr_05 (line 26) | typedef struct Eurydice_arr_05_s { __m256i data[25U]; } Eurydice_arr_05;
  type Eurydice_arr_05 (line 34) | typedef Eurydice_arr_05 libcrux_sha3_generic_keccak_KeccakState_55;
  type libcrux_sha3_generic_keccak_KeccakState_55 (line 36) | typedef libcrux_sha3_generic_keccak_KeccakState_55

FILE: out/test-libcrux-ml-dsa/libcrux_sha3_internal.h
  type Eurydice_arr_26 (line 26) | typedef Eurydice_arr_26 libcrux_sha3_generic_keccak_KeccakState_17;
  type libcrux_sha3_generic_keccak_KeccakState_17 (line 28) | typedef libcrux_sha3_generic_keccak_KeccakState_17 libcrux_sha3_portable...
  type libcrux_sha3_generic_keccak_xof_KeccakXofState_e2 (line 37) | typedef struct libcrux_sha3_generic_keccak_xof_KeccakXofState_e2_s
  type libcrux_sha3_generic_keccak_xof_KeccakXofState_e2 (line 46) | typedef libcrux_sha3_generic_keccak_xof_KeccakXofState_e2
  function KRML_MUSTINLINE (line 52) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_zero_d2(void)
  function KRML_MUSTINLINE (line 57) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 72) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 84) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_7...
  function KRML_MUSTINLINE (line 89) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable__vrax1q_u64(u...
  function KRML_MUSTINLINE (line 97) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 103) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 112) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 118) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable__veorq_n_u64(...
  function KRML_MUSTINLINE (line 126) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 135) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_xor_d2(uint64...
  function libcrux_sha3_generic_keccak_new_80_04 (line 149) | libcrux_sha3_generic_keccak_new_80_04(void)
  function KRML_MUSTINLINE (line 169) | static KRML_MUSTINLINE const
  function KRML_MUSTINLINE (line 182) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 193) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 256) | static KRML_MUSTINLINE void
  function libcrux_sha3_simd_portable_load_last_a1_c6 (line 287) | static inline void
  function libcrux_sha3_generic_keccak_set_80_04 (line 415) | static inline void
  function KRML_MUSTINLINE (line 427) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_0...
  function KRML_MUSTINLINE (line 438) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 453) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 465) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_a...
  function KRML_MUSTINLINE (line 476) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 491) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 503) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_0...
  function KRML_MUSTINLINE (line 514) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 529) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 541) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_a...
  function KRML_MUSTINLINE (line 552) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 567) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 582) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 623) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 638) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 650) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_5...
  function KRML_MUSTINLINE (line 661) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 676) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 688) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_e...
  function KRML_MUSTINLINE (line 699) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 714) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 726) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_6...
  function KRML_MUSTINLINE (line 737) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 752) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 764) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_6...
  function KRML_MUSTINLINE (line 775) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 790) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 805) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 846) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_a...
  function KRML_MUSTINLINE (line 857) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 872) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 884) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_5...
  function KRML_MUSTINLINE (line 895) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 910) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 922) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_6...
  function KRML_MUSTINLINE (line 933) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 948) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 960) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_6...
  function KRML_MUSTINLINE (line 971) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 986) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 998) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_2...
  function KRML_MUSTINLINE (line 1009) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1024) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1039) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1080) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_3...
  function KRML_MUSTINLINE (line 1091) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1106) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1118) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_b...
  function KRML_MUSTINLINE (line 1129) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1144) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1156) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_b...
  function KRML_MUSTINLINE (line 1167) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1182) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1194) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_5...
  function KRML_MUSTINLINE (line 1205) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1220) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1232) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_4...
  function KRML_MUSTINLINE (line 1243) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1258) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1273) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1314) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_c...
  function KRML_MUSTINLINE (line 1325) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1340) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1352) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_7...
  function KRML_MUSTINLINE (line 1363) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1378) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1390) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_2...
  function KRML_MUSTINLINE (line 1401) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1416) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1428) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_a...
  function KRML_MUSTINLINE (line 1439) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1454) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1466) | static KRML_MUSTINLINE uint64_t libcrux_sha3_simd_portable_rotate_left_f...
  function KRML_MUSTINLINE (line 1477) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1492) | static KRML_MUSTINLINE uint64_t
  function KRML_MUSTINLINE (line 1507) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1551) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1570) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1604) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1643) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1682) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1721) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1760) | static KRML_MUSTINLINE void libcrux_sha3_generic_keccak_pi_80_04(Eurydic...
  function KRML_MUSTINLINE (line 1779) | static KRML_MUSTINLINE void libcrux_sha3_generic_keccak_chi_80_04(Eurydi...
  function KRML_MUSTINLINE (line 1812) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1832) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1857) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1874) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 1937) | static KRML_MUSTINLINE void
  function libcrux_sha3_simd_portable_load_last_a1_ad (line 1968) | static inline void
  function KRML_MUSTINLINE (line 1990) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2007) | static KRML_MUSTINLINE void
  function libcrux_sha3_simd_portable_squeeze_9b_5b (line 2057) | static inline void
  function KRML_MUSTINLINE (line 2073) | static KRML_MUSTINLINE void
  function libcrux_sha3_simd_portable_squeeze_9b_3a (line 2123) | static inline void
  function libcrux_sha3_simd_portable_load_block_a1_5b (line 2142) | static inline void
  function KRML_MUSTINLINE (line 2157) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2220) | static KRML_MUSTINLINE void
  function libcrux_sha3_simd_portable_load_last_a1_7c (line 2251) | static inline void
  function KRML_MUSTINLINE (line 2273) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2290) | static KRML_MUSTINLINE void
  function libcrux_sha3_simd_portable_squeeze_9b_7a (line 2340) | static inline void
  function libcrux_sha3_simd_portable_load_block_a1_7a (line 2359) | static inline void
  function KRML_MUSTINLINE (line 2379) | static KRML_MUSTINLINE void
  function libcrux_sha3_generic_keccak_portable_keccak1_7c (line 2396) | static inline void
  function KRML_MUSTINLINE (line 2468) | static KRML_MUSTINLINE void
  function libcrux_sha3_simd_portable_load_last_a1_ad0 (line 2499) | static inline void
  function KRML_MUSTINLINE (line 2521) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2543) | static KRML_MUSTINLINE void
  function libcrux_sha3_generic_keccak_portable_keccak1_ad0 (line 2560) | static inline void
  function KRML_MUSTINLINE (line 2631) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2694) | static KRML_MUSTINLINE void
  function libcrux_sha3_simd_portable_load_last_a1_1e (line 2725) | static inline void
  function KRML_MUSTINLINE (line 2747) | static KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 2764) | static KRML_MUSTINLINE void
  function libcrux_sha3_simd_portable_squeeze_9b_2c (line 2814) | static inline void
  function libcrux_sha3_simd_portable_load_block_a1_2c (line 2833) | static inline void
  function KRML_MUSTINLINE (line 2853) | static KRML_MUSTINLINE void
  function libcrux_sha3_generic_keccak_portable_keccak1_1e (line 2870) | static inline void
  function libcrux_sha3_generic_keccak_portable_keccak1_ad (line 2942) | static inline void
  function libcrux_sha3_simd_portable_load_block_a1_3a (line 3016) | static inline void
  function KRML_MUSTINLINE (line 3036) | static KRML_MUSTINLINE void
  function libcrux_sha3_generic_keccak_portable_keccak1_c6 (line 3053) | static inline void

FILE: out/test-libcrux-ml-kem-no-const/internal/libcrux_core.h
  type core_option_Option_87_tags (line 23) | typedef uint8_t core_option_Option_87_tags;
  type core_option_Option_87 (line 30) | typedef struct core_option_Option_87_s
  type core_ops_range_Range_87 (line 50) | typedef struct core_ops_range_Range_87_s
  type Eurydice_arr_df (line 246) | typedef struct Eurydice_arr_df_s { uint8_t data[1536U]; } Eurydice_arr_df;
  type Eurydice_arr_e7 (line 298) | typedef struct Eurydice_arr_e7_s { uint8_t data[352U]; } Eurydice_arr_e7;
  type Eurydice_arr_89 (line 323) | typedef struct Eurydice_arr_89_s { uint8_t data[128U]; } Eurydice_arr_89;
  type Eurydice_arr_3b0 (line 331) | typedef struct Eurydice_arr_3b0_s { Eurydice_arr_89 data[4U]; } Eurydice...
  type Eurydice_arr_fa (line 339) | typedef struct Eurydice_arr_fa_s { uint8_t data[33U]; } Eurydice_arr_fa;
  type Eurydice_arr_890 (line 347) | typedef struct Eurydice_arr_890_s { Eurydice_arr_fa data[4U]; } Eurydice...
  type Eurydice_arr_5b (line 363) | typedef struct Eurydice_arr_5b_s { int16_t data[272U]; } Eurydice_arr_5b;
  type Eurydice_arr_24 (line 371) | typedef struct Eurydice_arr_24_s { Eurydice_arr_5b data[4U]; } Eurydice_...
  type Eurydice_arr_cc (line 379) | typedef struct Eurydice_arr_cc_s { size_t data[4U]; } Eurydice_arr_cc;
  type Eurydice_arr_79 (line 387) | typedef struct Eurydice_arr_79_s { uint8_t data[504U]; } Eurydice_arr_79;
  type Eurydice_arr_7c0 (line 395) | typedef struct Eurydice_arr_7c0_s { Eurydice_arr_79 data[4U]; } Eurydice...
  type Eurydice_arr_31 (line 403) | typedef struct Eurydice_arr_31_s { uint8_t data[34U]; } Eurydice_arr_31;
  type Eurydice_arr_56 (line 411) | typedef struct Eurydice_arr_56_s { Eurydice_arr_31 data[4U]; } Eurydice_...
  type Eurydice_arr_14 (line 419) | typedef struct Eurydice_arr_14_s { uint8_t data[1600U]; } Eurydice_arr_14;
  type Eurydice_mut_borrow_slice_u8_x4 (line 492) | typedef struct Eurydice_mut_borrow_slice_u8_x4_s
  type Eurydice_mut_borrow_slice_u8_x2 (line 501) | typedef struct Eurydice_mut_borrow_slice_u8_x2_s
  type Eurydice_arr_0e (line 591) | typedef struct Eurydice_arr_0e_s { uint8_t data[1152U]; } Eurydice_arr_0e;
  type Eurydice_arr_58 (line 669) | typedef struct Eurydice_arr_58_s { Eurydice_arr_89 data[3U]; } Eurydice_...
  type Eurydice_arr_801 (line 677) | typedef struct Eurydice_arr_801_s { Eurydice_arr_fa data[3U]; } Eurydice...
  type Eurydice_arr_2c (line 693) | typedef struct Eurydice_arr_2c_s { Eurydice_arr_c5 data[3U]; } Eurydice_...
  type Eurydice_arr_b1 (line 701) | typedef struct Eurydice_arr_b1_s { Eurydice_arr_5b data[3U]; } Eurydice_...
  type Eurydice_arr_eb0 (line 709) | typedef struct Eurydice_arr_eb0_s { size_t data[3U]; } Eurydice_arr_eb0;
  type Eurydice_arr_7e (line 717) | typedef struct Eurydice_arr_7e_s { Eurydice_arr_79 data[3U]; } Eurydice_...
  type Eurydice_arr_81 (line 725) | typedef struct Eurydice_arr_81_s { Eurydice_arr_31 data[3U]; } Eurydice_...
  type Eurydice_arr_af (line 733) | typedef struct Eurydice_arr_af_s { uint8_t data[1120U]; } Eurydice_arr_af;
  type Eurydice_arr_b20 (line 916) | typedef struct Eurydice_arr_b20_s { uint8_t data[384U]; } Eurydice_arr_b20;
  type core_result_Result_07_tags (line 938) | typedef uint8_t core_result_Result_07_tags;
  type core_result_Result_07 (line 945) | typedef struct core_result_Result_07_s
  type Eurydice_arr_b0 (line 1032) | typedef struct Eurydice_arr_b0_s { uint8_t data[320U]; } Eurydice_arr_b0;
  type Eurydice_arr_f3 (line 1057) | typedef struct Eurydice_arr_f3_s { Eurydice_arr_89 data[2U]; } Eurydice_...
  type Eurydice_arr_04 (line 1073) | typedef struct Eurydice_arr_04_s { int16_t data[256U]; } Eurydice_arr_04;
  type Eurydice_arr_1c (line 1089) | typedef struct Eurydice_arr_1c_s { uint8_t data[192U]; } Eurydice_arr_1c;
  type Eurydice_arr_eb (line 1097) | typedef struct Eurydice_arr_eb_s { Eurydice_arr_1c data[2U]; } Eurydice_...
  type Eurydice_arr_4d (line 1121) | typedef struct Eurydice_arr_4d_s { Eurydice_arr_fa data[2U]; } Eurydice_...
  type Eurydice_arr_5b0 (line 1166) | typedef struct Eurydice_arr_5b0_s { Eurydice_arr_c5 data[2U]; } Eurydice...
  type Eurydice_arr_800 (line 1174) | typedef struct Eurydice_arr_800_s { Eurydice_arr_5b data[2U]; } Eurydice...
  type Eurydice_arr_85 (line 1182) | typedef struct Eurydice_arr_85_s { size_t data[2U]; } Eurydice_arr_85;
  type Eurydice_arr_b8 (line 1208) | typedef struct Eurydice_arr_b8_s { Eurydice_arr_79 data[2U]; } Eurydice_...
  type Eurydice_arr_bf (line 1224) | typedef struct Eurydice_arr_bf_s { Eurydice_arr_31 data[2U]; } Eurydice_...
  type core_result_Result_57 (line 1385) | typedef struct core_result_Result_57_s
  type core_result_Result_83 (line 1411) | typedef struct core_result_Result_83_s
  type core_result_Result_80 (line 1437) | typedef struct core_result_Result_80_s
  type core_result_Result_ec (line 1621) | typedef struct core_result_Result_ec_s
  type Eurydice_arr_34 (line 1648) | typedef struct Eurydice_arr_34_s { int16_t data[128U]; } Eurydice_arr_34;
  type Eurydice_arr_9c (line 1656) | typedef struct Eurydice_arr_9c_s { Eurydice_arr_c5 data[4U]; } Eurydice_...
  type Eurydice_arr_dc (line 1664) | typedef struct Eurydice_arr_dc_s { Eurydice_arr_ff data[4U]; } Eurydice_...
  type Eurydice_arr_0b0 (line 1672) | typedef struct Eurydice_arr_0b0_s { Eurydice_mut_borrow_slice_u8 data[4U...
  type Eurydice_arr_c4 (line 1712) | typedef struct Eurydice_arr_c4_s { uint8_t data[104U]; } Eurydice_arr_c4;
  type Eurydice_arr_f4 (line 1737) | typedef struct Eurydice_arr_f4_s { uint8_t data[144U]; } Eurydice_arr_f4;
  type Eurydice_arr_ab (line 1813) | typedef struct Eurydice_arr_ab_s { uint8_t data[72U]; } Eurydice_arr_ab;
  type core_result_Result_8e (line 1828) | typedef struct core_result_Result_8e_s
  type libcrux_ml_kem_utils_extraction_helper_Keypair768 (line 1866) | typedef struct libcrux_ml_kem_utils_extraction_helper_Keypair768_s
  type libcrux_ml_kem_utils_extraction_helper_Keypair512 (line 1873) | typedef struct libcrux_ml_kem_utils_extraction_helper_Keypair512_s
  type libcrux_ml_kem_utils_extraction_helper_Keypair1024 (line 1880) | typedef struct libcrux_ml_kem_utils_extraction_helper_Keypair1024_s

FILE: out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem1024_avx2.h
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_d4 (line 22) | typedef libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_d4

FILE: out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem1024_portable.h
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_94 (line 22) | typedef libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_94

FILE: out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem512_avx2.h
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_c7 (line 22) | typedef libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_c7

FILE: out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem512_portable.h
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_3b (line 22) | typedef libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_3b

FILE: out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem768_avx2.h
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_ef (line 22) | typedef libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_ef

FILE: out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem768_portable.h
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_51 (line 22) | typedef libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_51

FILE: out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem_avx2.h
  type Eurydice_arr_13 (line 27) | typedef struct Eurydice_arr_13_s { __m256i data[16U]; } Eurydice_arr_13;
  type Eurydice_arr_60 (line 35) | typedef struct Eurydice_arr_60_s { Eurydice_arr_13 data[3U]; } Eurydice_...
  type Eurydice_arr_ea (line 43) | typedef struct Eurydice_arr_ea_s { Eurydice_arr_60 data[3U]; } Eurydice_...
  type libcrux_ml_kem_ind_cpa_unpacked_IndCpaPublicKeyUnpacked_ef (line 51) | typedef struct libcrux_ml_kem_ind_cpa_unpacked_IndCpaPublicKeyUnpacked_ef_s
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_ef (line 65) | typedef struct libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_ef_s
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPrivateKeyUnpacked_ef (line 95) | typedef struct libcrux_ml_kem_ind_cca_unpacked_MlKemPrivateKeyUnpacked_ef_s
  type libcrux_ml_kem_mlkem768_avx2_unpacked_MlKem768KeyPairUnpacked (line 102) | typedef struct libcrux_ml_kem_mlkem768_avx2_unpacked_MlKem768KeyPairUnpa...
  type Eurydice_arr_3b (line 484) | typedef struct Eurydice_arr_3b_s { Eurydice_arr_13 data[4U]; } Eurydice_...
  type Eurydice_arr_cd (line 492) | typedef struct Eurydice_arr_cd_s { Eurydice_arr_3b data[4U]; } Eurydice_...
  type libcrux_ml_kem_ind_cpa_unpacked_IndCpaPublicKeyUnpacked_d4 (line 500) | typedef struct libcrux_ml_kem_ind_cpa_unpacked_IndCpaPublicKeyUnpacked_d4_s
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_d4 (line 514) | typedef struct libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_d4_s
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPrivateKeyUnpacked_d4 (line 544) | typedef struct libcrux_ml_kem_ind_cca_unpacked_MlKemPrivateKeyUnpacked_d4_s
  type libcrux_ml_kem_mlkem1024_avx2_unpacked_MlKem1024KeyPairUnpacked (line 551) | typedef struct libcrux_ml_kem_mlkem1024_avx2_unpacked_MlKem1024KeyPairUn...
  type Eurydice_arr_ee (line 902) | typedef struct Eurydice_arr_ee_s { Eurydice_arr_13 data[2U]; } Eurydice_...
  type Eurydice_arr_e2 (line 910) | typedef struct Eurydice_arr_e2_s { Eurydice_arr_ee data[2U]; } Eurydice_...
  type libcrux_ml_kem_ind_cpa_unpacked_IndCpaPublicKeyUnpacked_c7 (line 918) | typedef struct libcrux_ml_kem_ind_cpa_unpacked_IndCpaPublicKeyUnpacked_c7_s
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_c7 (line 932) | typedef struct libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_c7_s
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPrivateKeyUnpacked_c7 (line 962) | typedef struct libcrux_ml_kem_ind_cca_unpacked_MlKemPrivateKeyUnpacked_c7_s
  type libcrux_ml_kem_mlkem512_avx2_unpacked_MlKem512KeyPairUnpacked (line 969) | typedef struct libcrux_ml_kem_mlkem512_avx2_unpacked_MlKem512KeyPairUnpa...

FILE: out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem_portable.h
  type Eurydice_arr_9e (line 33) | typedef struct Eurydice_arr_9e_s { Eurydice_arr_d6 data[16U]; } Eurydice...
  type Eurydice_arr_d20 (line 41) | typedef struct Eurydice_arr_d20_s { Eurydice_arr_9e data[4U]; } Eurydice...
  type Eurydice_arr_600 (line 49) | typedef struct Eurydice_arr_600_s { Eurydice_arr_d20 data[4U]; } Eurydic...
  type libcrux_ml_kem_ind_cpa_unpacked_IndCpaPublicKeyUnpacked_94 (line 57) | typedef struct libcrux_ml_kem_ind_cpa_unpacked_IndCpaPublicKeyUnpacked_94_s
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_94 (line 71) | typedef struct libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_94_s
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPrivateKeyUnpacked_94 (line 136) | typedef struct libcrux_ml_kem_ind_cca_unpacked_MlKemPrivateKeyUnpacked_94_s
  type libcrux_ml_kem_mlkem1024_portable_unpacked_MlKem1024KeyPairUnpacked (line 143) | typedef struct libcrux_ml_kem_mlkem1024_portable_unpacked_MlKem1024KeyPa...
  type Eurydice_arr_1e (line 512) | typedef struct Eurydice_arr_1e_s { Eurydice_arr_9e data[2U]; } Eurydice_...
  type Eurydice_arr_df0 (line 520) | typedef struct Eurydice_arr_df0_s { Eurydice_arr_1e data[2U]; } Eurydice...
  type libcrux_ml_kem_ind_cpa_unpacked_IndCpaPublicKeyUnpacked_3b (line 528) | typedef struct libcrux_ml_kem_ind_cpa_unpacked_IndCpaPublicKeyUnpacked_3b_s
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_3b (line 542) | typedef struct libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_3b_s
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPrivateKeyUnpacked_3b (line 607) | typedef struct libcrux_ml_kem_ind_cca_unpacked_MlKemPrivateKeyUnpacked_3b_s
  type libcrux_ml_kem_mlkem512_portable_unpacked_MlKem512KeyPairUnpacked (line 614) | typedef struct libcrux_ml_kem_mlkem512_portable_unpacked_MlKem512KeyPair...
  type Eurydice_arr_bb (line 983) | typedef struct Eurydice_arr_bb_s { Eurydice_arr_9e data[3U]; } Eurydice_...
  type Eurydice_arr_1d (line 991) | typedef struct Eurydice_arr_1d_s { Eurydice_arr_bb data[3U]; } Eurydice_...
  type libcrux_ml_kem_ind_cpa_unpacked_IndCpaPublicKeyUnpacked_51 (line 999) | typedef struct libcrux_ml_kem_ind_cpa_unpacked_IndCpaPublicKeyUnpacked_51_s
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_51 (line 1013) | typedef struct libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_51_s
  type libcrux_ml_kem_ind_cca_unpacked_MlKemPrivateKeyUnpacked_51 (line 1078) | typedef struct libcrux_ml_kem_ind_cca_unpacked_MlKemPrivateKeyUnpacked_51_s
  type libcrux_ml_kem_mlkem768_portable_unpacked_MlKem768KeyPairUnpacked (line 1085) | typedef struct libcrux_ml_kem_mlkem768_portable_unpacked_MlKem768KeyPair...

FILE: out/test-libcrux-ml-kem-no-const/internal/libcrux_sha3_internal.h
  type Eurydice_arr_60 (line 21) | typedef Eurydice_arr_60 libcrux_sha3_Sha3_256Digest;

FILE: out/test-libcrux-ml-kem-no-const/libcrux_core.c
  function KRML_NOINLINE (line 13) | static KRML_NOINLINE uint8_t inz(uint8_t value)
  function KRML_NOINLINE (line 20) | static KRML_NOINLINE uint8_t is_non_zero(uint8_t value)
  function KRML_NOINLINE (line 29) | static KRML_NOINLINE uint8_t
  function KRML_NOINLINE (line 42) | KRML_NOINLINE uint8_t
  function KRML_NOINLINE (line 55) | static KRML_NOINLINE Eurydice_arr_ec
  function KRML_NOINLINE (line 71) | KRML_NOINLINE Eurydice_arr_ec
  function KRML_NOINLINE (line 81) | KRML_NOINLINE Eurydice_arr_ec
  function libcrux_ml_kem_constants_ranked_bytes_per_ring_element (line 103) | size_t libcrux_ml_kem_constants_ranked_bytes_per_ring_element(size_t rank)
  function KRML_MUSTINLINE (line 116) | static KRML_MUSTINLINE uint8_t classify_27_90(uint8_t self)
  function libcrux_secrets_int_public_integers_declassify_d8_39 (line 129) | int16_t libcrux_secrets_int_public_integers_declassify_d8_39(int16_t self)
  function libcrux_secrets_int_as_u8_f5 (line 137) | uint8_t libcrux_secrets_int_as_u8_f5(int16_t self)
  function libcrux_secrets_int_public_integers_classify_27_39 (line 150) | int16_t libcrux_secrets_int_public_integers_classify_27_39(int16_t self)
  function KRML_MUSTINLINE (line 163) | static KRML_MUSTINLINE uint8_t declassify_d8_90(uint8_t self)
  function libcrux_secrets_int_as_i16_59 (line 171) | int16_t libcrux_secrets_int_as_i16_59(uint8_t self)
  function KRML_MUSTINLINE (line 184) | static KRML_MUSTINLINE int16_t secret_39(int16_t x)
  function libcrux_secrets_int_I16 (line 189) | int16_t libcrux_secrets_int_I16(int16_t v)
  function KRML_MUSTINLINE (line 202) | static KRML_MUSTINLINE int32_t classify_27_a8(int32_t self)
  function libcrux_secrets_int_as_i32_f5 (line 210) | int32_t libcrux_secrets_int_as_i32_f5(int16_t self)
  function KRML_MUSTINLINE (line 223) | static KRML_MUSTINLINE int32_t declassify_d8_a8(int32_t self)
  function libcrux_secrets_int_as_i16_36 (line 231) | int16_t libcrux_secrets_int_as_i16_36(int32_t self)
  function KRML_MUSTINLINE (line 244) | static KRML_MUSTINLINE uint32_t declassify_d8_df(uint32_t self)
  function libcrux_secrets_int_as_i32_b8 (line 252) | int32_t libcrux_secrets_int_as_i32_b8(uint32_t self)
  function KRML_MUSTINLINE (line 265) | static KRML_MUSTINLINE uint16_t classify_27_de(uint16_t self)
  function libcrux_secrets_int_as_u16_f5 (line 273) | uint16_t libcrux_secrets_int_as_u16_f5(int16_t self)
  function KRML_MUSTINLINE (line 286) | static KRML_MUSTINLINE uint16_t declassify_d8_de(uint16_t self)
  function libcrux_secrets_int_as_i16_ca (line 294) | int16_t libcrux_secrets_int_as_i16_ca(uint16_t self)
  function KRML_MUSTINLINE (line 307) | static KRML_MUSTINLINE uint64_t classify_27_49(uint64_t self)
  function libcrux_secrets_int_as_u64_ca (line 315) | uint64_t libcrux_secrets_int_as_u64_ca(uint16_t self)
  function libcrux_secrets_int_public_integers_classify_27_df (line 328) | uint32_t libcrux_secrets_int_public_integers_classify_27_df(uint32_t self)
  function KRML_MUSTINLINE (line 341) | static KRML_MUSTINLINE uint64_t declassify_d8_49(uint64_t self)
  function libcrux_secrets_int_as_u32_a3 (line 349) | uint32_t libcrux_secrets_int_as_u32_a3(uint64_t self)
  function libcrux_secrets_int_as_i16_b8 (line 357) | int16_t libcrux_secrets_int_as_i16_b8(uint32_t self)
  function libcrux_secrets_int_as_i16_f5 (line 365) | int16_t libcrux_secrets_int_as_i16_f5(int16_t self)
  function Eurydice_arr_a8 (line 379) | Eurydice_arr_a8 libcrux_ml_kem_types_default_d3_0e(void)
  function Eurydice_mut_borrow_slice_u8 (line 390) | Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_d1 (line 407) | Eurydice_arr_d1 libcrux_ml_kem_types_from_51_d9(Eurydice_arr_d1 value)
  function libcrux_ml_kem_mlkem1024_MlKem1024KeyPair (line 424) | libcrux_ml_kem_mlkem1024_MlKem1024KeyPair
  function Eurydice_arr_a8 (line 438) | Eurydice_arr_a8 libcrux_ml_kem_types_from_b2_0e(Eurydice_arr_a8 value)
  function Eurydice_mut_borrow_slice_u8 (line 449) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 467) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_2f(Eurydice_arr...
  function Eurydice_arr_d1 (line 483) | Eurydice_arr_d1 libcrux_ml_kem_types_from_19_d9(Eurydice_arr_d1 value)
  function Eurydice_arr_d1 (line 499) | Eurydice_arr_d1 *libcrux_ml_kem_types_as_slice_e6_d9(Eurydice_arr_d1 *self)
  function Eurydice_arr_d1 (line 515) | Eurydice_arr_d1 *libcrux_ml_kem_types_as_slice_a9_d9(Eurydice_arr_d1 *self)
  function Eurydice_mut_borrow_slice_u8 (line 526) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 544) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_25(Eurydice_arr...
  function libcrux_ml_kem_utils_prf_input_inc_23 (line 557) | uint8_t
  function Eurydice_mut_borrow_slice_u8 (line 576) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_720(Eurydice_ar...
  function Eurydice_mut_borrow_slice_u8 (line 590) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_b50(Eurydice_ar...
  function Eurydice_mut_borrow_slice_u8 (line 606) | Eurydice_mut_borrow_slice_u8 libcrux_ml_kem_types_as_ref_c1_d9(Eurydice_...
  function Eurydice_mut_borrow_slice_u8 (line 617) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 630) | static Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_14 (line 650) | Eurydice_arr_14 libcrux_ml_kem_utils_into_padded_array_49(Eurydice_mut_b...
  function Eurydice_mut_borrow_slice_u8 (line 666) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 679) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 697) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_68(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8_x4 (line 716) | Eurydice_mut_borrow_slice_u8_x4
  function Eurydice_arr_7d (line 762) | Eurydice_arr_7d libcrux_ml_kem_types_default_d3_79(void)
  function Eurydice_mut_borrow_slice_u8 (line 773) | Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_5f (line 790) | Eurydice_arr_5f libcrux_ml_kem_types_from_51_3d(Eurydice_arr_5f value)
  function libcrux_ml_kem_mlkem768_MlKem768KeyPair (line 807) | libcrux_ml_kem_mlkem768_MlKem768KeyPair
  function Eurydice_arr_7d (line 821) | Eurydice_arr_7d libcrux_ml_kem_types_from_b2_79(Eurydice_arr_7d value)
  function Eurydice_mut_borrow_slice_u8 (line 832) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 850) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_f4(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 864) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 877) | Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_2b (line 897) | Eurydice_arr_2b libcrux_ml_kem_types_from_19_52(Eurydice_arr_2b value)
  function Eurydice_arr_5f (line 913) | Eurydice_arr_5f *libcrux_ml_kem_types_as_slice_e6_3d(Eurydice_arr_5f *self)
  function Eurydice_mut_borrow_slice_u8 (line 924) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_ff(Eurydice_arr...
  function Eurydice_arr_2b (line 943) | Eurydice_arr_2b *libcrux_ml_kem_types_as_slice_a9_52(Eurydice_arr_2b *self)
  function libcrux_ml_kem_utils_prf_input_inc_78 (line 953) | uint8_t
  function Eurydice_mut_borrow_slice_u8 (line 972) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_81(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 986) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_06(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 1002) | Eurydice_mut_borrow_slice_u8 libcrux_ml_kem_types_as_ref_c1_52(Eurydice_...
  function Eurydice_mut_borrow_slice_u8 (line 1013) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1026) | static Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_af (line 1046) | Eurydice_arr_af libcrux_ml_kem_utils_into_padded_array_66(Eurydice_mut_b...
  function Eurydice_mut_borrow_slice_u8 (line 1062) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1075) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1093) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_51(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8_x4 (line 1112) | Eurydice_mut_borrow_slice_u8_x4
  function Eurydice_mut_borrow_slice_u8 (line 1156) | Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_ec (line 1176) | Eurydice_arr_ec libcrux_ml_kem_utils_into_padded_array_ce(Eurydice_mut_b...
  function Eurydice_arr_ab0 (line 1194) | Eurydice_arr_ab0 libcrux_ml_kem_types_default_d3_be(void)
  function Eurydice_mut_borrow_slice_u8 (line 1205) | Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_03 (line 1222) | Eurydice_arr_03 libcrux_ml_kem_types_from_51_df(Eurydice_arr_03 value)
  function libcrux_ml_kem_types_MlKemKeyPair_0d (line 1239) | libcrux_ml_kem_types_MlKemKeyPair_0d
  function Eurydice_arr_ab0 (line 1253) | Eurydice_arr_ab0 libcrux_ml_kem_types_from_b2_be(Eurydice_arr_ab0 value)
  function Eurydice_mut_borrow_slice_u8 (line 1264) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1282) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_ed(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 1296) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1314) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_a9(Eurydice_arr...
  function Eurydice_arr_ec (line 1330) | Eurydice_arr_ec core_result_unwrap_26_39(core_result_Result_07 self)
  function Eurydice_arr_d2 (line 1351) | Eurydice_arr_d2 libcrux_ml_kem_types_from_19_80(Eurydice_arr_d2 value)
  function Eurydice_arr_03 (line 1367) | Eurydice_arr_03 *libcrux_ml_kem_types_as_slice_e6_df(Eurydice_arr_03 *self)
  function Eurydice_arr_d2 (line 1383) | Eurydice_arr_d2 *libcrux_ml_kem_types_as_slice_a9_80(Eurydice_arr_d2 *self)
  function Eurydice_mut_borrow_slice_u8 (line 1394) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_30(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 1408) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_98(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 1422) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_8f(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 1436) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1454) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_56(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 1468) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_78(Eurydice_arr...
  function Eurydice_mut_borrow_slice_i16 (line 1482) | Eurydice_mut_borrow_slice_i16 Eurydice_array_to_slice_mut_990(Eurydice_a...
  function Eurydice_mut_borrow_slice_u8 (line 1496) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_d9(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 1510) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_b5(Eurydice_arr...
  function libcrux_ml_kem_utils_prf_input_inc_af (line 1523) | uint8_t
  function Eurydice_mut_borrow_slice_u8 (line 1542) | Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_fa (line 1562) | Eurydice_arr_fa libcrux_ml_kem_utils_into_padded_array_29(Eurydice_mut_b...
  function Eurydice_mut_borrow_slice_u8 (line 1578) | static Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_31 (line 1598) | Eurydice_arr_31 libcrux_ml_kem_utils_into_padded_array_de(Eurydice_mut_b...
  function Eurydice_mut_borrow_slice_i16 (line 1614) | Eurydice_mut_borrow_slice_i16
  function Eurydice_mut_borrow_slice_u8 (line 1632) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1650) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_48(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 1664) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_e9(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 1677) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1688) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1700) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_3b(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 1714) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_27(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 1730) | Eurydice_mut_borrow_slice_u8 libcrux_ml_kem_types_as_ref_c1_80(Eurydice_...
  function Eurydice_mut_borrow_slice_u8 (line 1741) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1754) | Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_03 (line 1774) | Eurydice_arr_03 libcrux_ml_kem_utils_into_padded_array_df(Eurydice_mut_b...
  function Eurydice_mut_borrow_slice_u8 (line 1790) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1803) | Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_c7 (line 1823) | Eurydice_arr_c7 libcrux_ml_kem_utils_into_padded_array_c9(Eurydice_mut_b...
  function Eurydice_mut_borrow_slice_u8 (line 1839) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_82(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 1853) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1866) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 1884) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_99(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8_x4 (line 1903) | Eurydice_mut_borrow_slice_u8_x4
  function Eurydice_arr_94 (line 1949) | Eurydice_arr_94 core_result_unwrap_26_78(core_result_Result_57 self)
  function Eurydice_arr_fc (line 1970) | Eurydice_arr_fc core_result_unwrap_26_7d(core_result_Result_83 self)
  function Eurydice_arr_6d (line 1991) | Eurydice_arr_6d core_result_unwrap_26_63(core_result_Result_80 self)
  function Eurydice_mut_borrow_slice_u8 (line 2010) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 2028) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_29(Eurydice_arr...
  function Eurydice_mut_borrow_slice_i16 (line 2042) | Eurydice_mut_borrow_slice_i16 Eurydice_array_to_slice_mut_8a(Eurydice_ar...
  function Eurydice_arr_94 (line 2058) | Eurydice_arr_94 libcrux_secrets_int_public_integers_declassify_d8_40(Eur...
  function Eurydice_arr_fc (line 2071) | Eurydice_arr_fc libcrux_secrets_int_public_integers_declassify_d8_2b(Eur...
  function Eurydice_arr_6d (line 2084) | Eurydice_arr_6d libcrux_secrets_int_public_integers_declassify_d8_37(Eur...
  function Eurydice_array_u8x8 (line 2097) | Eurydice_array_u8x8
  function Eurydice_array_u8x2 (line 2111) | Eurydice_array_u8x2
  function Eurydice_mut_borrow_slice_u8 (line 2126) | Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_d6 (line 2140) | Eurydice_arr_d6 libcrux_secrets_int_public_integers_classify_27_4b(Euryd...
  function Eurydice_arr_d6 (line 2153) | Eurydice_arr_d6 libcrux_secrets_int_public_integers_declassify_d8_4b(Eur...
  function Eurydice_mut_borrow_slice_u8 (line 2166) | Eurydice_mut_borrow_slice_u8
  function Eurydice_arr_80 (line 2180) | Eurydice_arr_80 libcrux_secrets_int_public_integers_declassify_d8_0b(Eur...
  function Eurydice_mut_borrow_slice_i16 (line 2191) | Eurydice_mut_borrow_slice_i16
  function Eurydice_mut_borrow_slice_i16 (line 2211) | Eurydice_mut_borrow_slice_i16
  function Eurydice_mut_borrow_slice_i16 (line 2222) | Eurydice_mut_borrow_slice_i16
  function Eurydice_arr_d6 (line 2242) | Eurydice_arr_d6 core_result_unwrap_26_d3(core_result_Result_ec self)
  function Eurydice_mut_borrow_slice_u8 (line 2261) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_17(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 2275) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_9f(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 2289) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_01(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 2303) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_5e(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 2317) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_72(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 2331) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 2349) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_38(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 2363) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 2381) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_2c(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 2395) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 2413) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_58(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 2427) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 2445) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 2460) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_6e(Eurydice_arr...
  function Eurydice_mut_borrow_slice_u8 (line 2474) | Eurydice_mut_borrow_slice_u8 Eurydice_array_to_slice_mut_e2(Eurydice_arr...
  function Eurydice_array_u8x8 (line 2490) | Eurydice_array_u8x8 core_result_unwrap_26_e0(core_result_Result_8e self)
  function Eurydice_mut_borrow_slice_u8 (line 2508) | Eurydice_mut_borrow_slice_u8
  function Eurydice_mut_borrow_slice_u8 (line 2523) | Eurydice_mut_borrow_slice_u8

FILE: out/test-libcrux-ml-kem-no-const/libcrux_core.h
  type Eurydice_arr_ec (line 26) | typedef struct Eurydice_arr_ec_s { uint8_t data[32U]; } Eurydice_arr_ec;
  type Eurydice_arr_a8 (line 42) | typedef struct Eurydice_arr_a8_s { uint8_t data[3168U]; } Eurydice_arr_a8;
  type Eurydice_arr_d1 (line 50) | typedef struct Eurydice_arr_d1_s { uint8_t data[1568U]; } Eurydice_arr_d1;
  type libcrux_ml_kem_mlkem1024_MlKem1024KeyPair (line 52) | typedef struct libcrux_ml_kem_mlkem1024_MlKem1024KeyPair_s
  type tuple_25 (line 64) | typedef struct tuple_25_s
  type Eurydice_arr_7d (line 77) | typedef struct Eurydice_arr_7d_s { uint8_t data[2400U]; } Eurydice_arr_7d;
  type Eurydice_arr_5f (line 85) | typedef struct Eurydice_arr_5f_s { uint8_t data[1184U]; } Eurydice_arr_5f;
  type libcrux_ml_kem_mlkem768_MlKem768KeyPair (line 87) | typedef struct libcrux_ml_kem_mlkem768_MlKem768KeyPair_s
  type Eurydice_arr_2b (line 100) | typedef struct Eurydice_arr_2b_s { uint8_t data[1088U]; } Eurydice_arr_2b;
  type tuple_f4 (line 107) | typedef struct tuple_f4_s
  type Eurydice_arr_c5 (line 120) | typedef struct Eurydice_arr_c5_s { uint8_t data[168U]; } Eurydice_arr_c5;
  type Eurydice_arr_ab0 (line 128) | typedef struct Eurydice_arr_ab0_s { uint8_t data[1632U]; } Eurydice_arr_...
  type Eurydice_arr_03 (line 136) | typedef struct Eurydice_arr_03_s { uint8_t data[800U]; } Eurydice_arr_03;
  type libcrux_ml_kem_types_MlKemKeyPair_0d (line 144) | typedef struct libcrux_ml_kem_types_MlKemKeyPair_0d_s
  type Eurydice_arr_94 (line 157) | typedef struct Eurydice_arr_94_s { uint8_t data[24U]; } Eurydice_arr_94;
  type Eurydice_arr_d2 (line 165) | typedef struct Eurydice_arr_d2_s { uint8_t data[768U]; } Eurydice_arr_d2;
  type tuple_ab (line 172) | typedef struct tuple_ab_s
  type Eurydice_arr_6d (line 185) | typedef struct Eurydice_arr_6d_s { uint8_t data[10U]; } Eurydice_arr_6d;
  type Eurydice_arr_80 (line 193) | typedef struct Eurydice_arr_80_s { uint8_t data[22U]; } Eurydice_arr_80;
  type Eurydice_arr_fc (line 201) | typedef struct Eurydice_arr_fc_s { uint8_t data[20U]; } Eurydice_arr_fc;
  type Eurydice_arr_c7 (line 209) | typedef struct Eurydice_arr_c7_s { uint8_t data[64U]; } Eurydice_arr_c7;
  type Eurydice_arr_b2 (line 217) | typedef struct Eurydice_arr_b2_s { uint8_t data[16U]; } Eurydice_arr_b2;
  type Eurydice_arr_d6 (line 225) | typedef struct Eurydice_arr_d6_s { int16_t data[16U]; } Eurydice_arr_d6;
  type Eurydice_arr_87 (line 233) | typedef struct Eurydice_arr_87_s { Eurydice_arr_b2 data[256U]; } Eurydic...
  type Eurydice_arr_ff (line 241) | typedef struct Eurydice_arr_ff_s { uint8_t data[136U]; } Eurydice_arr_ff;
  type Eurydice_arr_0b (line 249) | typedef struct Eurydice_arr_0b_s { Eurydice_arr_ff data[1U]; } Eurydice_...
  type Eurydice_arr_88 (line 257) | typedef struct Eurydice_arr_88_s { Eurydice_arr_c5 data[1U]; } Eurydice_...
  type Eurydice_arr_65 (line 265) | typedef struct Eurydice_arr_65_s { uint8_t data[48U]; } Eurydice_arr_65;
  type Eurydice_arr_a2 (line 273) | typedef struct Eurydice_arr_a2_s { uint8_t data[28U]; } Eurydice_arr_a2;
  type Eurydice_arr_84 (line 281) | typedef struct Eurydice_arr_84_s { uint64_t data[5U]; } Eurydice_arr_84;
  type Eurydice_arr_69 (line 289) | typedef struct Eurydice_arr_69_s { Eurydice_mut_borrow_slice_u8 data[1U]...
  type Eurydice_arr_7c (line 297) | typedef struct Eurydice_arr_7c_s { uint64_t data[25U]; } Eurydice_arr_7c;
  type Eurydice_arr_22 (line 305) | typedef struct Eurydice_arr_22_s { uint64_t data[24U]; } Eurydice_arr_22;

FILE: out/test-libcrux-ml-kem-no-const/libcrux_mlkem1024.h
  type Eurydice_arr_a8 (line 50) | typedef Eurydice_arr_a8 libcrux_ml_kem_mlkem1024_MlKem1024PrivateKey;
  type Eurydice_arr_d1 (line 52) | typedef Eurydice_arr_d1 libcrux_ml_kem_mlkem1024_MlKem1024PublicKey;

FILE: out/test-libcrux-ml-kem-no-const/libcrux_mlkem1024_avx2.c
  function Eurydice_arr_ec (line 33) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 59) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 71) | Eurydice_arr_ec
  function tuple_25 (line 97) | static tuple_25 encapsulate_avx2_07(Eurydice_arr_d1 *public_key, Eurydic...
  function tuple_25 (line 119) | static tuple_25 encapsulate_07(Eurydice_arr_d1 *public_key, Eurydice_arr...
  function tuple_25 (line 131) | tuple_25
  function libcrux_ml_kem_mlkem1024_MlKem1024KeyPair (line 153) | static libcrux_ml_kem_mlkem1024_MlKem1024KeyPair
  function libcrux_ml_kem_mlkem1024_MlKem1024KeyPair (line 169) | static libcrux_ml_kem_mlkem1024_MlKem1024KeyPair
  function libcrux_ml_kem_mlkem1024_MlKem1024KeyPair (line 178) | libcrux_ml_kem_mlkem1024_MlKem1024KeyPair
  function validate_private_key_avx2_43 (line 191) | static bool
  function validate_private_key_43 (line 204) | static bool validate_private_key_43(Eurydice_arr_a8 *private_key, Eurydi...
  function libcrux_ml_kem_mlkem1024_avx2_validate_private_key (line 214) | bool
  function KRML_MUSTINLINE (line 232) | static KRML_MUSTINLINE bool validate_private_key_only_f5(Eurydice_arr_a8...
  function libcrux_ml_kem_mlkem1024_avx2_validate_private_key_only (line 242) | bool libcrux_ml_kem_mlkem1024_avx2_validate_private_key_only(Eurydice_ar...
  function validate_public_key_avx2_f5 (line 253) | static bool validate_public_key_avx2_f5(Eurydice_arr_d1 *public_key)
  function validate_public_key_f5 (line 264) | static bool validate_public_key_f5(Eurydice_arr_d1 *public_key)
  function libcrux_ml_kem_mlkem1024_avx2_validate_public_key (line 274) | bool libcrux_ml_kem_mlkem1024_avx2_validate_public_key(Eurydice_arr_d1 *...
  function Eurydice_arr_ec (line 299) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 331) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 347) | Eurydice_arr_ec
  function tuple_25 (line 373) | static tuple_25
  function tuple_25 (line 402) | static tuple_25
  function tuple_25 (line 420) | tuple_25
  function generate_keypair_avx2_b30 (line 439) | static void
  function generate_keypair_b30 (line 461) | static void
  function libcrux_ml_kem_mlkem1024_avx2_unpacked_generate_key_pair_mut (line 473) | void
  function libcrux_ml_kem_mlkem1024_avx2_unpacked_MlKem1024KeyPairUnpacked (line 485) | libcrux_ml_kem_mlkem1024_avx2_unpacked_MlKem1024KeyPairUnpacked
  function libcrux_ml_kem_mlkem1024_avx2_unpacked_MlKem1024KeyPairUnpacked (line 497) | libcrux_ml_kem_mlkem1024_avx2_unpacked_MlKem1024KeyPairUnpacked
  function libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_d4 (line 506) | libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_d4
  function KRML_MUSTINLINE (line 524) | static KRML_MUSTINLINE void
  function libcrux_ml_kem_mlkem1024_avx2_unpacked_key_pair_from_private_mut (line 536) | void
  function Eurydice_arr_a8 (line 548) | Eurydice_arr_a8
  function libcrux_ml_kem_mlkem1024_avx2_unpacked_key_pair_serialized_private_key_mut (line 559) | void
  function Eurydice_arr_d1 (line 571) | Eurydice_arr_d1
  function libcrux_ml_kem_mlkem1024_avx2_unpacked_key_pair_serialized_public_key_mut (line 582) | void
  function libcrux_ml_kem_mlkem1024_avx2_unpacked_serialized_public_key (line 594) | void
  function unpack_public_key_avx2_43 (line 613) | static void
  function unpack_public_key_43 (line 632) | static void
  function libcrux_ml_kem_mlkem1024_avx2_unpacked_unpacked_public_key (line 644) | void

FILE: out/test-libcrux-ml-kem-no-const/libcrux_mlkem1024_portable.c
  function Eurydice_arr_ec (line 36) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 48) | Eurydice_arr_ec
  function tuple_25 (line 74) | static tuple_25 encapsulate_07(Eurydice_arr_d1 *public_key, Eurydice_arr...
  function tuple_25 (line 86) | tuple_25
  function libcrux_ml_kem_mlkem1024_MlKem1024KeyPair (line 108) | static libcrux_ml_kem_mlkem1024_MlKem1024KeyPair
  function libcrux_ml_kem_mlkem1024_MlKem1024KeyPair (line 117) | libcrux_ml_kem_mlkem1024_MlKem1024KeyPair
  function KRML_MUSTINLINE (line 133) | static KRML_MUSTINLINE bool
  function libcrux_ml_kem_mlkem1024_portable_validate_private_key (line 144) | bool
  function KRML_MUSTINLINE (line 162) | static KRML_MUSTINLINE bool validate_private_key_only_f5(Eurydice_arr_a8...
  function libcrux_ml_kem_mlkem1024_portable_validate_private_key_only (line 172) | bool libcrux_ml_kem_mlkem1024_portable_validate_private_key_only(Eurydic...
  function KRML_MUSTINLINE (line 186) | static KRML_MUSTINLINE bool validate_public_key_f5(Eurydice_arr_d1 *publ...
  function libcrux_ml_kem_mlkem1024_portable_validate_public_key (line 196) | bool libcrux_ml_kem_mlkem1024_portable_validate_public_key(Eurydice_arr_...
  function KRML_MUSTINLINE (line 224) | static KRML_MUSTINLINE Eurydice_arr_ec
  function Eurydice_arr_ec (line 240) | Eurydice_arr_ec
  function KRML_MUSTINLINE (line 269) | static KRML_MUSTINLINE tuple_25
  function tuple_25 (line 287) | tuple_25
  function KRML_MUSTINLINE (line 309) | static KRML_MUSTINLINE void
  function libcrux_ml_kem_mlkem1024_portable_unpacked_generate_key_pair_mut (line 321) | void
  function libcrux_ml_kem_mlkem1024_portable_unpacked_MlKem1024KeyPairUnpacked (line 333) | libcrux_ml_kem_mlkem1024_portable_unpacked_MlKem1024KeyPairUnpacked
  function libcrux_ml_kem_mlkem1024_portable_unpacked_MlKem1024KeyPairUnpacked (line 345) | libcrux_ml_kem_mlkem1024_portable_unpacked_MlKem1024KeyPairUnpacked
  function libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_94 (line 354) | libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_94
  function KRML_MUSTINLINE (line 372) | static KRML_MUSTINLINE void
  function libcrux_ml_kem_mlkem1024_portable_unpacked_key_pair_from_private_mut (line 384) | void
  function Eurydice_arr_a8 (line 396) | Eurydice_arr_a8
  function libcrux_ml_kem_mlkem1024_portable_unpacked_key_pair_serialized_private_key_mut (line 407) | void
  function Eurydice_arr_d1 (line 419) | Eurydice_arr_d1
  function libcrux_ml_kem_mlkem1024_portable_unpacked_key_pair_serialized_public_key_mut (line 430) | void
  function libcrux_ml_kem_mlkem1024_portable_unpacked_serialized_public_key (line 442) | void
  function KRML_MUSTINLINE (line 461) | static KRML_MUSTINLINE void
  function libcrux_ml_kem_mlkem1024_portable_unpacked_unpacked_public_key (line 473) | void

FILE: out/test-libcrux-ml-kem-no-const/libcrux_mlkem512.h
  type Eurydice_arr_d2 (line 50) | typedef Eurydice_arr_d2 libcrux_ml_kem_mlkem512_MlKem512Ciphertext;
  type libcrux_ml_kem_types_MlKemKeyPair_0d (line 52) | typedef libcrux_ml_kem_types_MlKemKeyPair_0d libcrux_ml_kem_mlkem512_MlK...
  type Eurydice_arr_ab0 (line 54) | typedef Eurydice_arr_ab0 libcrux_ml_kem_mlkem512_MlKem512PrivateKey;
  type Eurydice_arr_03 (line 56) | typedef Eurydice_arr_03 libcrux_ml_kem_mlkem512_MlKem512PublicKey;

FILE: out/test-libcrux-ml-kem-no-const/libcrux_mlkem512_avx2.c
  function Eurydice_arr_ec (line 33) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 59) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 71) | Eurydice_arr_ec
  function tuple_ab (line 97) | static tuple_ab encapsulate_avx2_80(Eurydice_arr_03 *public_key, Eurydic...
  function tuple_ab (line 119) | static tuple_ab encapsulate_80(Eurydice_arr_03 *public_key, Eurydice_arr...
  function tuple_ab (line 131) | tuple_ab
  function libcrux_ml_kem_types_MlKemKeyPair_0d (line 153) | static libcrux_ml_kem_types_MlKemKeyPair_0d
  function libcrux_ml_kem_types_MlKemKeyPair_0d (line 169) | static libcrux_ml_kem_types_MlKemKeyPair_0d generate_keypair_b8(Eurydice...
  function libcrux_ml_kem_types_MlKemKeyPair_0d (line 177) | libcrux_ml_kem_types_MlKemKeyPair_0d
  function validate_private_key_avx2_25 (line 190) | static bool
  function validate_private_key_25 (line 203) | static bool validate_private_key_25(Eurydice_arr_ab0 *private_key, Euryd...
  function libcrux_ml_kem_mlkem512_avx2_validate_private_key (line 213) | bool
  function KRML_MUSTINLINE (line 231) | static KRML_MUSTINLINE bool validate_private_key_only_d5(Eurydice_arr_ab...
  function libcrux_ml_kem_mlkem512_avx2_validate_private_key_only (line 241) | bool libcrux_ml_kem_mlkem512_avx2_validate_private_key_only(Eurydice_arr...
  function validate_public_key_avx2_d5 (line 252) | static bool validate_public_key_avx2_d5(Eurydice_arr_03 *public_key)
  function validate_public_key_d5 (line 263) | static bool validate_public_key_d5(Eurydice_arr_03 *public_key)
  function libcrux_ml_kem_mlkem512_avx2_validate_public_key (line 273) | bool libcrux_ml_kem_mlkem512_avx2_validate_public_key(Eurydice_arr_03 *p...
  function Eurydice_arr_ec (line 298) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 330) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 346) | Eurydice_arr_ec
  function tuple_ab (line 372) | static tuple_ab
  function tuple_ab (line 401) | static tuple_ab
  function tuple_ab (line 417) | tuple_ab
  function generate_keypair_avx2_b80 (line 436) | static void
  function generate_keypair_b80 (line 458) | static void
  function libcrux_ml_kem_mlkem512_avx2_unpacked_generate_key_pair_mut (line 470) | void
  function libcrux_ml_kem_mlkem512_avx2_unpacked_MlKem512KeyPairUnpacked (line 482) | libcrux_ml_kem_mlkem512_avx2_unpacked_MlKem512KeyPairUnpacked
  function libcrux_ml_kem_mlkem512_avx2_unpacked_MlKem512KeyPairUnpacked (line 494) | libcrux_ml_kem_mlkem512_avx2_unpacked_MlKem512KeyPairUnpacked
  function libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_c7 (line 503) | libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_c7
  function KRML_MUSTINLINE (line 521) | static KRML_MUSTINLINE void
  function libcrux_ml_kem_mlkem512_avx2_unpacked_key_pair_from_private_mut (line 533) | void
  function Eurydice_arr_ab0 (line 545) | Eurydice_arr_ab0
  function libcrux_ml_kem_mlkem512_avx2_unpacked_key_pair_serialized_private_key_mut (line 556) | void
  function Eurydice_arr_03 (line 568) | Eurydice_arr_03
  function libcrux_ml_kem_mlkem512_avx2_unpacked_key_pair_serialized_public_key_mut (line 579) | void
  function libcrux_ml_kem_mlkem512_avx2_unpacked_serialized_public_key (line 591) | void
  function unpack_public_key_avx2_25 (line 610) | static void
  function unpack_public_key_25 (line 629) | static void
  function libcrux_ml_kem_mlkem512_avx2_unpacked_unpacked_public_key (line 641) | void

FILE: out/test-libcrux-ml-kem-no-const/libcrux_mlkem512_portable.c
  function Eurydice_arr_ec (line 36) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 48) | Eurydice_arr_ec
  function tuple_ab (line 74) | static tuple_ab encapsulate_80(Eurydice_arr_03 *public_key, Eurydice_arr...
  function tuple_ab (line 86) | tuple_ab
  function libcrux_ml_kem_types_MlKemKeyPair_0d (line 108) | static libcrux_ml_kem_types_MlKemKeyPair_0d generate_keypair_b8(Eurydice...
  function libcrux_ml_kem_types_MlKemKeyPair_0d (line 116) | libcrux_ml_kem_types_MlKemKeyPair_0d
  function KRML_MUSTINLINE (line 132) | static KRML_MUSTINLINE bool
  function libcrux_ml_kem_mlkem512_portable_validate_private_key (line 143) | bool
  function KRML_MUSTINLINE (line 161) | static KRML_MUSTINLINE bool validate_private_key_only_d5(Eurydice_arr_ab...
  function libcrux_ml_kem_mlkem512_portable_validate_private_key_only (line 171) | bool libcrux_ml_kem_mlkem512_portable_validate_private_key_only(Eurydice...
  function KRML_MUSTINLINE (line 185) | static KRML_MUSTINLINE bool validate_public_key_d5(Eurydice_arr_03 *publ...
  function libcrux_ml_kem_mlkem512_portable_validate_public_key (line 195) | bool libcrux_ml_kem_mlkem512_portable_validate_public_key(Eurydice_arr_0...
  function KRML_MUSTINLINE (line 223) | static KRML_MUSTINLINE Eurydice_arr_ec
  function Eurydice_arr_ec (line 239) | Eurydice_arr_ec
  function KRML_MUSTINLINE (line 268) | static KRML_MUSTINLINE tuple_ab
  function tuple_ab (line 284) | tuple_ab
  function KRML_MUSTINLINE (line 306) | static KRML_MUSTINLINE void
  function libcrux_ml_kem_mlkem512_portable_unpacked_generate_key_pair_mut (line 318) | void
  function libcrux_ml_kem_mlkem512_portable_unpacked_MlKem512KeyPairUnpacked (line 330) | libcrux_ml_kem_mlkem512_portable_unpacked_MlKem512KeyPairUnpacked
  function libcrux_ml_kem_mlkem512_portable_unpacked_MlKem512KeyPairUnpacked (line 342) | libcrux_ml_kem_mlkem512_portable_unpacked_MlKem512KeyPairUnpacked
  function libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_3b (line 351) | libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_3b
  function KRML_MUSTINLINE (line 369) | static KRML_MUSTINLINE void
  function libcrux_ml_kem_mlkem512_portable_unpacked_key_pair_from_private_mut (line 381) | void
  function Eurydice_arr_ab0 (line 393) | Eurydice_arr_ab0
  function libcrux_ml_kem_mlkem512_portable_unpacked_key_pair_serialized_private_key_mut (line 404) | void
  function Eurydice_arr_03 (line 416) | Eurydice_arr_03
  function libcrux_ml_kem_mlkem512_portable_unpacked_key_pair_serialized_public_key_mut (line 427) | void
  function libcrux_ml_kem_mlkem512_portable_unpacked_serialized_public_key (line 439) | void
  function KRML_MUSTINLINE (line 458) | static KRML_MUSTINLINE void
  function libcrux_ml_kem_mlkem512_portable_unpacked_unpacked_public_key (line 470) | void

FILE: out/test-libcrux-ml-kem-no-const/libcrux_mlkem768.h
  type Eurydice_arr_7d (line 50) | typedef Eurydice_arr_7d libcrux_ml_kem_mlkem768_MlKem768PrivateKey;
  type Eurydice_arr_5f (line 52) | typedef Eurydice_arr_5f libcrux_ml_kem_mlkem768_MlKem768PublicKey;

FILE: out/test-libcrux-ml-kem-no-const/libcrux_mlkem768_avx2.c
  function Eurydice_arr_ec (line 33) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 59) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 71) | Eurydice_arr_ec
  function tuple_f4 (line 97) | static tuple_f4 encapsulate_avx2_26(Eurydice_arr_5f *public_key, Eurydic...
  function tuple_f4 (line 119) | static tuple_f4 encapsulate_26(Eurydice_arr_5f *public_key, Eurydice_arr...
  function tuple_f4 (line 131) | tuple_f4
  function libcrux_ml_kem_mlkem768_MlKem768KeyPair (line 153) | static libcrux_ml_kem_mlkem768_MlKem768KeyPair
  function libcrux_ml_kem_mlkem768_MlKem768KeyPair (line 169) | static libcrux_ml_kem_mlkem768_MlKem768KeyPair generate_keypair_e9(Euryd...
  function libcrux_ml_kem_mlkem768_MlKem768KeyPair (line 177) | libcrux_ml_kem_mlkem768_MlKem768KeyPair
  function validate_private_key_avx2_d3 (line 190) | static bool
  function validate_private_key_d3 (line 203) | static bool validate_private_key_d3(Eurydice_arr_7d *private_key, Eurydi...
  function libcrux_ml_kem_mlkem768_avx2_validate_private_key (line 213) | bool
  function KRML_MUSTINLINE (line 231) | static KRML_MUSTINLINE bool validate_private_key_only_3b(Eurydice_arr_7d...
  function libcrux_ml_kem_mlkem768_avx2_validate_private_key_only (line 241) | bool libcrux_ml_kem_mlkem768_avx2_validate_private_key_only(Eurydice_arr...
  function validate_public_key_avx2_3b (line 252) | static bool validate_public_key_avx2_3b(Eurydice_arr_5f *public_key)
  function validate_public_key_3b (line 263) | static bool validate_public_key_3b(Eurydice_arr_5f *public_key)
  function libcrux_ml_kem_mlkem768_avx2_validate_public_key (line 273) | bool libcrux_ml_kem_mlkem768_avx2_validate_public_key(Eurydice_arr_5f *p...
  function Eurydice_arr_ec (line 298) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 330) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 346) | Eurydice_arr_ec
  function tuple_f4 (line 372) | static tuple_f4
  function tuple_f4 (line 401) | static tuple_f4
  function tuple_f4 (line 417) | tuple_f4
  function generate_keypair_avx2_e90 (line 436) | static void
  function generate_keypair_e90 (line 458) | static void
  function libcrux_ml_kem_mlkem768_avx2_unpacked_generate_key_pair_mut (line 470) | void
  function libcrux_ml_kem_mlkem768_avx2_unpacked_MlKem768KeyPairUnpacked (line 482) | libcrux_ml_kem_mlkem768_avx2_unpacked_MlKem768KeyPairUnpacked
  function libcrux_ml_kem_mlkem768_avx2_unpacked_MlKem768KeyPairUnpacked (line 494) | libcrux_ml_kem_mlkem768_avx2_unpacked_MlKem768KeyPairUnpacked
  function libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_ef (line 503) | libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_ef
  function KRML_MUSTINLINE (line 521) | static KRML_MUSTINLINE void
  function libcrux_ml_kem_mlkem768_avx2_unpacked_key_pair_from_private_mut (line 533) | void
  function Eurydice_arr_7d (line 545) | Eurydice_arr_7d
  function libcrux_ml_kem_mlkem768_avx2_unpacked_key_pair_serialized_private_key_mut (line 556) | void
  function Eurydice_arr_5f (line 568) | Eurydice_arr_5f
  function libcrux_ml_kem_mlkem768_avx2_unpacked_key_pair_serialized_public_key_mut (line 579) | void
  function libcrux_ml_kem_mlkem768_avx2_unpacked_public_key (line 591) | void
  function libcrux_ml_kem_mlkem768_avx2_unpacked_serialized_public_key (line 606) | void
  function unpack_public_key_avx2_d3 (line 625) | static void
  function unpack_public_key_d3 (line 644) | static void
  function libcrux_ml_kem_mlkem768_avx2_unpacked_unpacked_public_key (line 656) | void

FILE: out/test-libcrux-ml-kem-no-const/libcrux_mlkem768_portable.c
  function Eurydice_arr_ec (line 36) | static Eurydice_arr_ec
  function Eurydice_arr_ec (line 48) | Eurydice_arr_ec
  function tuple_f4 (line 74) | static tuple_f4 encapsulate_26(Eurydice_arr_5f *public_key, Eurydice_arr...
  function tuple_f4 (line 86) | tuple_f4
  function libcrux_ml_kem_mlkem768_MlKem768KeyPair (line 108) | static libcrux_ml_kem_mlkem768_MlKem768KeyPair generate_keypair_e9(Euryd...
  function libcrux_ml_kem_mlkem768_MlKem768KeyPair (line 116) | libcrux_ml_kem_mlkem768_MlKem768KeyPair
  function KRML_MUSTINLINE (line 132) | static KRML_MUSTINLINE bool
  function libcrux_ml_kem_mlkem768_portable_validate_private_key (line 143) | bool
  function KRML_MUSTINLINE (line 161) | static KRML_MUSTINLINE bool validate_private_key_only_3b(Eurydice_arr_7d...
  function libcrux_ml_kem_mlkem768_portable_validate_private_key_only (line 171) | bool libcrux_ml_kem_mlkem768_portable_validate_private_key_only(Eurydice...
  function KRML_MUSTINLINE (line 185) | static KRML_MUSTINLINE bool validate_public_key_3b(Eurydice_arr_5f *publ...
  function libcrux_ml_kem_mlkem768_portable_validate_public_key (line 195) | bool libcrux_ml_kem_mlkem768_portable_validate_public_key(Eurydice_arr_5...
  function KRML_MUSTINLINE (line 223) | static KRML_MUSTINLINE Eurydice_arr_ec
  function Eurydice_arr_ec (line 239) | Eurydice_arr_ec
  function KRML_MUSTINLINE (line 268) | static KRML_MUSTINLINE tuple_f4
  function tuple_f4 (line 284) | tuple_f4
  function KRML_MUSTINLINE (line 306) | static KRML_MUSTINLINE void
  function libcrux_ml_kem_mlkem768_portable_unpacked_generate_key_pair_mut (line 318) | void
  function libcrux_ml_kem_mlkem768_portable_unpacked_MlKem768KeyPairUnpacked (line 330) | libcrux_ml_kem_mlkem768_portable_unpacked_MlKem768KeyPairUnpacked
  function libcrux_ml_kem_mlkem768_portable_unpacked_MlKem768KeyPairUnpacked (line 342) | libcrux_ml_kem_mlkem768_portable_unpacked_MlKem768KeyPairUnpacked
  function libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_51 (line 351) | libcrux_ml_kem_ind_cca_unpacked_MlKemPublicKeyUnpacked_51
  function KRML_MUSTINLINE (line 369) | static KRML_MUSTINLINE void
  function libcrux_ml_kem_mlkem768_portable_unpacked_key_pair_from_private_mut (line 381) | void
  function Eurydice_arr_7d (line 393) | Eurydice_arr_7d
  function libcrux_ml_kem_mlkem768_portable_unpacked_key_pair_serialized_private_key_mut (line 404) | void
  function Eurydice_arr_5f (line 416) | Eurydice_arr_5f
  function libcrux_ml_kem_mlkem768_portable_unpacked_key_pair_serialized_public_key_mut (line 427) | void
  function libcrux_ml_kem_mlkem768_portable_unpacked_public_key (line 439) | void
  function libcrux_ml_kem_mlkem768_portable_unpacked_serialized_public_key (line 454) | void
  function KRML_MUSTINLINE (line 473) | static KRML_MUSTINLINE void
  function libcrux_ml_kem_mlkem768_portable_unpacked_unpacked_public_key (line 485) | void

FILE: out/test-libcrux-ml-kem-no-const/libcrux_mlkem_avx2.c
  function KRML_MUSTINLINE (line 17) | KRML_MUSTINLINE Eurydice_arr_c7
  function KRML_MUSTINLINE (line 25) | KRML_MUSTINLINE Eurydice_arr_ec
  function KRML_MUSTINLINE (line 33) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_vec_zero(void)
  function KRML_MUSTINLINE (line 41) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_ZERO_f5(void)
  function KRML_MUSTINLINE (line 46) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 55) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 61) | KRML_MUSTINLINE Eurydice_arr_d6 libcrux_ml_kem_vector_avx2_vec_to_i16_ar...
  function KRML_MUSTINLINE (line 71) | KRML_MUSTINLINE Eurydice_arr_d6 libcrux_ml_kem_vector_avx2_to_i16_array_...
  function KRML_MUSTINLINE (line 76) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 87) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 93) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 104) | KRML_MUSTINLINE void
  function KRML_MUSTINLINE (line 110) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_arithmetic_add(__m256...
  function KRML_MUSTINLINE (line 118) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_add_f5(__m256i lhs, _...
  function KRML_MUSTINLINE (line 123) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_arithmetic_sub(__m256...
  function KRML_MUSTINLINE (line 131) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_sub_f5(__m256i lhs, _...
  function KRML_MUSTINLINE (line 136) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 146) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 152) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 162) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_cond_subtract_3329(__...
  function KRML_MUSTINLINE (line 170) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_cond_subtract_3329_f5...
  function KRML_MUSTINLINE (line 179) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_arithmetic_barrett_re...
  function KRML_MUSTINLINE (line 198) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_barrett_reduce_f5(__m...
  function KRML_MUSTINLINE (line 203) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 224) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 230) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 245) | static KRML_MUSTINLINE __m256i shift_right_ef(__m256i vector)
  function KRML_MUSTINLINE (line 250) | KRML_MUSTINLINE __m256i
  function __m256i (line 264) | __m256i libcrux_ml_kem_vector_avx2_to_unsigned_representative_f5(__m256i a)
  function KRML_MUSTINLINE (line 269) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 285) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_compress_1(__m256i ve...
  function KRML_MUSTINLINE (line 293) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_compress_1_f5(__m256i...
  function KRML_MUSTINLINE (line 298) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 311) | KRML_MUSTINLINE __m256i libcrux_ml_kem_vector_avx2_compress_decompress_1...
  function __m256i (line 321) | __m256i libcrux_ml_kem_vector_avx2_decompress_1_f5(__m256i a)
  function KRML_MUSTINLINE (line 326) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 343) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 377) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 392) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 404) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 432) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 441) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 447) | KRML_MUSTINLINE __m128i
  function KRML_MUSTINLINE (line 464) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 479) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 488) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 494) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 533) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 548) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 560) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 596) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 605) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 615) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 630) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 639) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 645) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 662) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 777) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 799) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 812) | KRML_MUSTINLINE Eurydice_array_u8x2
  function KRML_MUSTINLINE (line 825) | KRML_MUSTINLINE Eurydice_array_u8x2 libcrux_ml_kem_vector_avx2_serialize...
  function KRML_MUSTINLINE (line 833) | KRML_MUSTINLINE Eurydice_array_u8x2 libcrux_ml_kem_vector_avx2_serialize...
  function KRML_MUSTINLINE (line 838) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 864) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 872) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 880) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 889) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 901) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 910) | KRML_MUSTINLINE Eurydice_array_u8x8
  function KRML_MUSTINLINE (line 968) | KRML_MUSTINLINE Eurydice_array_u8x8 libcrux_ml_kem_vector_avx2_serialize...
  function KRML_MUSTINLINE (line 976) | KRML_MUSTINLINE Eurydice_array_u8x8 libcrux_ml_kem_vector_avx2_serialize...
  function KRML_MUSTINLINE (line 981) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 1020) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 1043) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 1057) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 1066) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 1072) | KRML_MUSTINLINE Eurydice_arr_6d
  function KRML_MUSTINLINE (line 1128) | KRML_MUSTINLINE Eurydice_arr_6d libcrux_ml_kem_vector_avx2_serialize_5_f...
  function KRML_MUSTINLINE (line 1142) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 1148) | KRML_MUSTINLINE __m256i
  function KRML_MUSTINLINE (line 1233) | KRML_MUSTINLINE __m256i
  function core_core_arch_x86___m128i_x2 (line 1239) | core_core_arch_x86___m128i_x2
  function KRML_MUSTINLINE (line 1289) | KRML_MUSTINLINE Eurydice_arr_fc
  function KRML_MUSTINLINE (l
Condensed preview — 346 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,713K chars).
[
  {
    "path": ".github/workflows/nix.yaml",
    "chars": 995,
    "preview": "name: Build Eurydice and run tests\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n  workflow_dispatch:\n\n# Cance"
  },
  {
    "path": ".gitignore",
    "chars": 154,
    "preview": "/karamel\n/charon\n/libcrux\n\n_build\ntest/*/target\nout/*/a.out\n*.DS_Store\n*.orig\n*.llbc\neurydice\n/.vscode\n.charon_version\n\n"
  },
  {
    "path": ".ocamlformat",
    "chars": 198,
    "preview": "profile = default\nversion = 0.27.0\nmargin = 100\n\nbreak-cases = fit-or-vertical\nexp-grouping = preserve\nif-then-else = ve"
  },
  {
    "path": ".ocamlformat-ignore",
    "chars": 26,
    "preview": "lib/charon/**\nlib/krml/**\n"
  },
  {
    "path": "LICENSE-APACHE",
    "chars": 11351,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "LICENSE-MIT",
    "chars": 1078,
    "preview": "MIT License\n\nCopyright (c) 2024 Eurydice Contributors\n\nPermission is hereby granted, free of charge, to any person obtai"
  },
  {
    "path": "Makefile",
    "chars": 7752,
    "preview": "CHARON_HOME \t?= $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/charon\nKRML_HOME \t?= $(dir $(abspath $(lastword $(MAKEFIL"
  },
  {
    "path": "README.md",
    "chars": 4170,
    "preview": "<p><div style=\"text-align: center\">\n<img src=\"static/poussin.jpg\"\n     alt=\"Orphée et Eurydice\" title=\"Orphée et Eurydic"
  },
  {
    "path": "bin/dune",
    "chars": 175,
    "preview": "(executable\n (public_name eurydice)\n (name main)\n (libraries eurydice terminal))\n\n(env\n (_\n  (flags\n   (:standard -w @1-"
  },
  {
    "path": "bin/main.ml",
    "chars": 17322,
    "preview": "let () =\n  let usage =\n    Printf.sprintf\n      {|Eurydice: from Rust to C\n\nUsage: %s [OPTIONS] FILES\n\nFILES are .llbc f"
  },
  {
    "path": "cremepat/Lex.ml",
    "chars": 2305,
    "preview": "open Sedlexing\nopen Parse\n\nlet digit = [%sedlex.regexp? '0' .. '9']\nlet integer = [%sedlex.regexp? Plus digit]\nlet low_a"
  },
  {
    "path": "cremepat/Parse.mly",
    "chars": 3459,
    "preview": "%{\n  open ParseTree\n%}\n\n%token<int>     INT\n%token<string>  UIDENT LIDENT UVAR UVARLIST\n%token          EOF COMMA EQUALS"
  },
  {
    "path": "cremepat/ParseTree.ml",
    "chars": 1001,
    "preview": "(* Strictly a parse tree *)\ntype pre_expr =\n  (* Binding most loosely *)\n  | Let of string * expr * expr\n  | Sequence of"
  },
  {
    "path": "cremepat/README.md",
    "chars": 189,
    "preview": "CREMEPAT: CREdible, Meta-Extensible PATterns\n--------------------------------------------\n\nWrite concrete syntax instead"
  },
  {
    "path": "cremepat/cremepat.ml",
    "chars": 9832,
    "preview": "module Terminal = struct\n  let mkcolor x = Printf.sprintf \"\\x1b[38;5;%dm\" x\n  let green = mkcolor 119\n  let red = mkcolo"
  },
  {
    "path": "cremepat/dune",
    "chars": 265,
    "preview": "(library\n (name cremepat)\n (kind ppx_rewriter)\n (libraries ppxlib menhirLib)\n (preprocess\n  (pps sedlex.ppx))\n (flags\n  "
  },
  {
    "path": "dune",
    "chars": 40,
    "preview": "(data_only_dirs charon karamel libcrux)\n"
  },
  {
    "path": "dune-project",
    "chars": 464,
    "preview": "(lang dune 3.13)\n\n(name eurydice)\n\n(generate_opam_files true)\n\n(source\n (github AeneasVerif/eurydice))\n\n(authors \"Son Ho"
  },
  {
    "path": "eurydice.opam",
    "chars": 773,
    "preview": "# This file is generated by dune, edit dune-project instead\nopam-version: \"2.0\"\nsynopsis: \"A Rust to C translator\"\ndescr"
  },
  {
    "path": "flake.nix",
    "chars": 6823,
    "preview": "{\n  inputs = {\n    nixpkgs.follows = \"charon/nixpkgs\";\n    flake-utils.follows = \"karamel/flake-utils\";\n    karamel.url "
  },
  {
    "path": "include/eurydice_glue.h",
    "chars": 20486,
    "preview": "#pragma once\n\n#include <inttypes.h>\n#include <stdbool.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#if"
  },
  {
    "path": "lib/AstOfLlbc.ml",
    "chars": 127314,
    "preview": "(* C for Charon *)\nmodule C = struct\n  include Charon.GAst\n  include Charon.LlbcAst\n  include Charon.Types\n  include Cha"
  },
  {
    "path": "lib/Builtin.ml",
    "chars": 34720,
    "preview": "module K = struct\n  include Krml.Ast\nend\n\n(** 1. Things that could otherwise be emitted as an extern prototype, but for "
  },
  {
    "path": "lib/Bundles.ml",
    "chars": 23539,
    "preview": "(* A more modern version of the krml facility that matches on lids (instead of file names), and\n   relies on a YAML file"
  },
  {
    "path": "lib/Cleanup1.ml",
    "chars": 20506,
    "preview": "open Krml.Ast\nopen Krml.DeBruijn\nmodule H = Krml.Helpers\nmodule AtomMap = Map.Make (Krml.Atom)\nmodule AtomSet = Set.Make"
  },
  {
    "path": "lib/Cleanup2.ml",
    "chars": 60147,
    "preview": "open Krml.Ast\nopen Krml.DeBruijn\nmodule H = Krml.Helpers\nmodule L = Logging\nopen Krml.PrintAst.Ops\n\n(* Target cleanups i"
  },
  {
    "path": "lib/Cleanup3.ml",
    "chars": 5758,
    "preview": "(* Administrative cleanups that do not get checked. *)\n\n(* CG-polymorphic external signatures generally cannot be implem"
  },
  {
    "path": "lib/LoadLlbc.ml",
    "chars": 334,
    "preview": "let load_file filename =\n  match Charon.OfJson.crate_of_json_file filename with\n  | Ok r -> r\n  | Error e ->\n      Print"
  },
  {
    "path": "lib/Logging.ml",
    "chars": 625,
    "preview": "module StringSet = Set.Make (String)\n\ntype logging = None | All | Some of StringSet.t\n\nlet logging = ref None\n\nlet enabl"
  },
  {
    "path": "lib/Options.ml",
    "chars": 149,
    "preview": "let log_level = ref \"\"\nlet config = ref \"\"\nlet comments = ref false\nlet fatal_errors = ref false\nlet keep_going = ref fa"
  },
  {
    "path": "lib/PreCleanup.ml",
    "chars": 9265,
    "preview": "open Krml.Ast\nmodule H = Krml.Helpers\n\n(* All the transformations that need to happen in order for the program to type-c"
  },
  {
    "path": "lib/Utf8.ml",
    "chars": 695,
    "preview": "let ascii_of_utf8_str (str : string) =\n  let get_uchar_list (str : string) =\n    let rec get_uchar_list acc idx =\n      "
  },
  {
    "path": "lib/dune",
    "chars": 199,
    "preview": "(library\n (name eurydice)\n (libraries charon krml yaml)\n (preprocess\n  (pps ppx_deriving.std cremepat)))\n\n(env\n (_\n  (fl"
  },
  {
    "path": "out/test-array/array.c",
    "chars": 9773,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-array/array.h",
    "chars": 7399,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef a"
  },
  {
    "path": "out/test-array2d/array2d.c",
    "chars": 1234,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-array2d/array2d.h",
    "chars": 1106,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef a"
  },
  {
    "path": "out/test-castunsize/castunsize.c",
    "chars": 2815,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-castunsize/castunsize.h",
    "chars": 2162,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef c"
  },
  {
    "path": "out/test-closure/closure.c",
    "chars": 2159,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-closure/closure.h",
    "chars": 2203,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef c"
  },
  {
    "path": "out/test-closure_fn_cast/closure_fn_cast.c",
    "chars": 1209,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-closure_fn_cast/closure_fn_cast.h",
    "chars": 1097,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef c"
  },
  {
    "path": "out/test-collision/collision.c",
    "chars": 763,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-collision/collision.h",
    "chars": 948,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef c"
  },
  {
    "path": "out/test-const_generics/const_generics.c",
    "chars": 6456,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-const_generics/const_generics.h",
    "chars": 3912,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef c"
  },
  {
    "path": "out/test-core_num/core_num.c",
    "chars": 514,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-core_num/core_num.h",
    "chars": 678,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef c"
  },
  {
    "path": "out/test-dst/dst.c",
    "chars": 4816,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-dst/dst.h",
    "chars": 3836,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef d"
  },
  {
    "path": "out/test-dyn_trait_struct_type/dyn_trait_struct_type.c",
    "chars": 345,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-dyn_trait_struct_type/dyn_trait_struct_type.h",
    "chars": 1893,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef d"
  },
  {
    "path": "out/test-floating_points/floating_points.c",
    "chars": 2081,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-floating_points/floating_points.h",
    "chars": 892,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef f"
  },
  {
    "path": "out/test-fn_cast/fn_cast.c",
    "chars": 982,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-fn_cast/fn_cast.h",
    "chars": 793,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef f"
  },
  {
    "path": "out/test-fn_higher_order/fn_higher_order.c",
    "chars": 3027,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-fn_higher_order/fn_higher_order.h",
    "chars": 3613,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef f"
  },
  {
    "path": "out/test-for/for.c",
    "chars": 342,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-for/for.h",
    "chars": 2051,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef f"
  },
  {
    "path": "out/test-global_ref/global_ref.c",
    "chars": 977,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-global_ref/global_ref.h",
    "chars": 782,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef g"
  },
  {
    "path": "out/test-i32_shl/i32_shl.c",
    "chars": 792,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-i32_shl/i32_shl.h",
    "chars": 498,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-inline_attributes/inline_attributes.c",
    "chars": 453,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-inline_attributes/inline_attributes.h",
    "chars": 494,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-int_switch/int_switch.c",
    "chars": 603,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-int_switch/int_switch.h",
    "chars": 378,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_102/issue_102.c",
    "chars": 167,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_102/issue_102.h",
    "chars": 555,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_104/issue_104.c",
    "chars": 820,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_104/issue_104.h",
    "chars": 725,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_105/issue_105.c",
    "chars": 4688,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_105/issue_105.h",
    "chars": 3683,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_106/issue_106.c",
    "chars": 451,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_106/issue_106.h",
    "chars": 494,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_107/issue_107.c",
    "chars": 290,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_107/issue_107.h",
    "chars": 450,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_123/issue_123.c",
    "chars": 1430,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_123/issue_123.h",
    "chars": 1287,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_128/issue_128.c",
    "chars": 1131,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_128/issue_128.h",
    "chars": 764,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_212/issue_212.c",
    "chars": 498,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_212/issue_212.h",
    "chars": 678,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_37/issue_37.c",
    "chars": 426,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_37/issue_37.h",
    "chars": 624,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_49/issue_49.c",
    "chars": 586,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_49/issue_49.h",
    "chars": 627,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_96/issue_96.c",
    "chars": 384,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_96/issue_96.h",
    "chars": 753,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_k630/issue_k630.c",
    "chars": 871,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_k630/issue_k630.h",
    "chars": 869,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-issue_shift/issue_shift.c",
    "chars": 1659,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-issue_shift/issue_shift.h",
    "chars": 518,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-dsa/internal/libcrux_mldsa_avx2.h",
    "chars": 1781,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-dsa/internal/libcrux_mldsa_core.h",
    "chars": 59247,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-dsa/internal/libcrux_mldsa_portable.h",
    "chars": 2378,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-dsa/internal/libcrux_sha3_avx2.h",
    "chars": 8768,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-dsa/internal/libcrux_sha3_internal.h",
    "chars": 29588,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa44_avx2.c",
    "chars": 4671,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa44_avx2.h",
    "chars": 2631,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa44_portable.c",
    "chars": 4483,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa44_portable.h",
    "chars": 2622,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa65_avx2.c",
    "chars": 5061,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa65_avx2.h",
    "chars": 2827,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa65_portable.c",
    "chars": 4787,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa65_portable.h",
    "chars": 2822,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa87_avx2.c",
    "chars": 4673,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa87_avx2.h",
    "chars": 2631,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa87_portable.c",
    "chars": 4485,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa87_portable.h",
    "chars": 2622,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa_avx2.c",
    "chars": 339862,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa_avx2.h",
    "chars": 50606,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa_core.c",
    "chars": 177605,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa_core.h",
    "chars": 14402,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa_portable.c",
    "chars": 168222,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_mldsa_portable.h",
    "chars": 15461,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_sha3.h",
    "chars": 3329,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_sha3_avx2.c",
    "chars": 96725,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_sha3_avx2.h",
    "chars": 3200,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-dsa/libcrux_sha3_internal.h",
    "chars": 94797,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/internal/libcrux_core.h",
    "chars": 56278,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem/internal/libcrux_mlkem1024_avx2.h",
    "chars": 4013,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem/internal/libcrux_mlkem1024_portable.h",
    "chars": 4129,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem/internal/libcrux_mlkem512_avx2.h",
    "chars": 3824,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem/internal/libcrux_mlkem512_portable.h",
    "chars": 3940,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem/internal/libcrux_mlkem768_avx2.h",
    "chars": 4063,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem/internal/libcrux_mlkem768_portable.h",
    "chars": 4187,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem/internal/libcrux_mlkem_avx2.h",
    "chars": 37578,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem/internal/libcrux_mlkem_portable.h",
    "chars": 44374,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem/internal/libcrux_sha3_internal.h",
    "chars": 518,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_core.c",
    "chars": 71499,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_core.h",
    "chars": 6615,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem1024.h",
    "chars": 2701,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem1024_avx2.c",
    "chars": 16533,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem1024_avx2.h",
    "chars": 1756,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem1024_portable.c",
    "chars": 12386,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem1024_portable.h",
    "chars": 1796,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem512.h",
    "chars": 2818,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem512_avx2.c",
    "chars": 16252,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem512_avx2.h",
    "chars": 1737,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem512_portable.c",
    "chars": 12147,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem512_portable.h",
    "chars": 1777,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem768.h",
    "chars": 2661,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem768_avx2.c",
    "chars": 16754,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem768_avx2.h",
    "chars": 1737,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem768_portable.c",
    "chars": 12618,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem768_portable.h",
    "chars": 1777,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem_avx2.c",
    "chars": 381439,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem_avx2.h",
    "chars": 15960,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem_portable.c",
    "chars": 376559,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_mlkem_portable.h",
    "chars": 45956,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_sha3_avx2.c",
    "chars": 89244,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_sha3_avx2.h",
    "chars": 3211,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_sha3_internal.h",
    "chars": 565,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_sha3_portable.c",
    "chars": 111802,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem/libcrux_sha3_portable.h",
    "chars": 50388,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/internal/libcrux_core.h",
    "chars": 49179,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem1024_avx2.h",
    "chars": 3953,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem1024_portable.h",
    "chars": 4069,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem512_avx2.h",
    "chars": 3764,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem512_portable.h",
    "chars": 3880,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem768_avx2.h",
    "chars": 3997,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem768_portable.h",
    "chars": 4121,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem_avx2.h",
    "chars": 37194,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/internal/libcrux_mlkem_portable.h",
    "chars": 43996,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/internal/libcrux_sha3_internal.h",
    "chars": 518,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef i"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_core.c",
    "chars": 61527,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_core.h",
    "chars": 6623,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem1024.h",
    "chars": 2701,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem1024_avx2.c",
    "chars": 16257,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem1024_avx2.h",
    "chars": 1714,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem1024_portable.c",
    "chars": 12194,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem1024_portable.h",
    "chars": 1754,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem512.h",
    "chars": 2818,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem512_avx2.c",
    "chars": 15976,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem512_avx2.h",
    "chars": 1695,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem512_portable.c",
    "chars": 11955,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem512_portable.h",
    "chars": 1735,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem768.h",
    "chars": 2661,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem768_avx2.c",
    "chars": 16472,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem768_avx2.h",
    "chars": 1695,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem768_portable.c",
    "chars": 12420,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem768_portable.h",
    "chars": 1735,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem_avx2.c",
    "chars": 380267,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem_avx2.h",
    "chars": 16014,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem_portable.c",
    "chars": 375424,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_mlkem_portable.h",
    "chars": 46034,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_sha3_avx2.c",
    "chars": 89044,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_sha3_avx2.h",
    "chars": 3259,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_sha3_internal.h",
    "chars": 565,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_sha3_portable.c",
    "chars": 111598,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-libcrux-ml-kem-no-const/libcrux_sha3_portable.h",
    "chars": 50330,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-lvalue/lvalue.c",
    "chars": 1135,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-lvalue/lvalue.h",
    "chars": 1062,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef l"
  },
  {
    "path": "out/test-mismatch/mismatch.c",
    "chars": 165,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-mismatch/mismatch.h",
    "chars": 338,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef m"
  },
  {
    "path": "out/test-more_dst/more_dst.c",
    "chars": 1447,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#include "
  },
  {
    "path": "out/test-more_dst/more_dst.h",
    "chars": 2005,
    "preview": "/* \n  This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>\n\n  F* version: <unknown>\n\n */\n\n#ifndef m"
  }
]

// ... and 146 more files (download for full content)

About this extraction

This page contains the full source code of the AeneasVerif/eurydice GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 346 files (5.3 MB), approximately 1.4M tokens, and a symbol index with 5334 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!